Archive for May, 2008

The Launch: Dos and Don’ts of Real Life Deploys

« 30 May 2008 | 17:15 | Uncategorized | No Comments »

Alpha asap. Famspam did alpha testing with their family.
Beta:
- at this point you should probably have some way to filter and aggregate response data.
Optimization:
- ab - apache_bookmark.
- httperf, bong
Test data: add a million rows of gibberish with ruby_faker
query_trace: shows which code is spawning which queries and how they perform.
Vendor everything.
FamSpam uses jQuery.
He said ‘gitsplosion’…
Service hooks. […]



Meta-Programming for fun and profit

« 30 May 2008 | 16:06 | Uncategorized | No Comments »

Came in late.
Was discussing using forwardable to implement the delegator pattern. see def_delegator.
Missings:
method_missing, showed example of using method_missing to harvest messages to a class. Freeze would fail because Object implements that method so the Recorder itself gets frozen not the playback object. The solution: BlankSlate or as it will be called in Ruby 1.9, SimpleObject, […]



Scaling to a billion

« 30 May 2008 | 16:05 | railsconf 2008, rubyonrails | No Comments »

Guy created Warbook. Had to rewrite the application within three weeks of launch due to scaling issues.
So, figure out why it is slow:
- Started with Firebug net tab.
- mint had to go wouldn’t scale
- pl_analyse, iostat, io was a point of failure, MTop.
- pagination also caused the app to drag. Ditched it too. Worked around […]



Datamapper

« 30 May 2008 | 14:26 | Uncategorized | No Comments »

Datamapper:
Forces explicit property declaration.
Datastore’s are connected by adaptors.
Identity Mapper: looking for an object with same id should return the SAME OBJECT. foo[1] == foo[1]
LoadedSet: Foo.all tracks which objects come out of the database at the same time to allow changes across the set at db level.
Support composite keys. Keys are arrays
Naming Conventions: allows you to […]



EngineYard hosting

« 30 May 2008 | 14:10 | railsconf 2008, rubyonrails | No Comments »

use explain with /G to test queries and make sure they are using your indexes. all index columns must be left to right in column order or they are ignored.
Plugins:
Ferret is hated. Sphinx is better.
image science + monit clears some environment variables. solvable by setting env vars in configs.
don’t forget to set log levels to […]