Friday: Going Off The Grid

By Evan Weaver

  • shadow (gem install shadow), restful record server
  • dynamically create an active class – klass = Class.new(ActiveRecord::Base) { self.table_name = table }
  • active record thread safety
    • multiconnection mode broken (allow_concurrency)
    • shared connection mode broken
  • strategies for integrating multiple languages
    • reimplement (jruby)
    • language specific
      • c
      • c extension
      • rubyinline

code reuse

  • admin interface?
  • streamlined, active scaffold, autoadmin
  • django has auto admin interface
  • demo’d django use with rails, django for admin/ruby and rails for the rest

Extending rails itself

  • has_many_polymorphs
    • massive case statement
    • sql strings all over the place
    • tightly-coupled classes
    • refactoring discussion on rails-core
  • using the rails source is your only friend but it’s not always a good friend

to the future

  • junking AR
  • hyper-denormalized model
  • db is just a hash
    • berkeleydb
    • memcached
    • madeleine
  • denormalize everything
    • precache everything you could ever possibly want to know
    • moves joins into the write process instead of the read process
  • examples
    • flickr – images in groups are duplicates of user images; no relationship, only done on write of the image
  • when not to? when you really can’t predict what you might want to know

mutex

  • rails – mutex wraps everything so it’s locked at request time
  • merb – thread safe routing system so it only has to lock when active record is in use

IO

  • has good support for hash based databases and gets rid of sql

Good talk. Bounced around. Kind of boring in the beginning but very interesting high level concepts at the end.

0 Comments

Sorry, comments are closed for this article to ease the burden of pruning spam.

About

Authored by John Nunemaker (Noo-neh-maker), a programmer who has fallen deeply in love with Ruby. Learn More.

Projects

Flipper
Release your software more often with fewer problems.
Flip your features.