Article Baked Not Fried

Published

Sun, 13 Aug 2006

Tags

rails rake scaling

0 comments


subscribe

When I started doing web application development a few years ago I developed an unhealthy habit. All my content was dynamically created on the fly, even if it rarely changed. Aaron Swartz recommends against that in Bake, Don't Fry (and follows Building Baked Sites). One of those things I created (with Britt) userscripts.org became very popular. As the number of hits increased I had to turn off other services that weren't as vital (which included my blog).

If my site was baked it could still function although without several dynamic portions, but since it was fried the site became unusable when I turned off the fryer. But the site required a rather complex setup, and wasn't built to run without it.

So, I've dug through old tables extracting data from my old site (having to reinstall databases, deal with incompatibilities, ...) and converted everything to files checked into svn. Then I've built a simple Rake system to build only those things that have changed, outputing html/atom that can be put on any server.

Creating dependencies dynamically has never been so easy. You can use procedural or OO ruby code to create tasks with dependencies at runtime.

I'm still working out how to make it more generic and to have dynamic linking of erb templates (such as the one that generates my header) and tasks, but I'm liking the results so far.

My next task will be add some dynamicness back to the site (allowing people to enter comments again.) Feel free to mail me in the mean time.


 

Add your comment