Colin Charles Agenda

ActiveRecord

ActiveRecord, by Rabble.

  1. views
  2. stored procedures
  3. FK constraints
  4. cascading commits
  5. split/clustered DBs
  6. enums
  1. has_one – when the FK is in the OTHER table
  2. belongs_to – when the FK is in THIS table
  3. has_many
  4. has_and_belongs_to_many

Rabble also gave us an anecdote from his Odeo days. They thought that grabbing feeds should be done in parallel. Which is when they used RubyThreads. And suddenly, they were getting some horrendous database problems, duplicate records and so on. Moral of the story: RubyThreads and ActiveRecord don’t mix. A member of the audience mentioned that using find_by_sql consumed about 1MB of memory in his application, however, using ActiveRecord to do the same thing was costing about 20MB per thread.

Technorati Tags: , , , , ,