Advanced Mongrel: Handlers and Plugins
Location: E145 - E146
Mongrel is a fast, flexible, pure-Ruby webserver. You’re already using it, so why not learn to break apart your stack and get more power out of the pieces by accessing them individually?
Mongrel observes all requests before they reach Rails, so take control with the full power of Ruby. Add new commands to mongrel_rails, change configuration settings, or build new request processing capabilities. And since Mongrel is running in the same VM instance as your Rails app, you can access your underlying Rails app as much or as little as you want.
There are a zillion cool modifications you can make to Mongrel, but the most interesting ones are specific customizations for your app. We’ll show you just how powerful and easy it is to modify Mongrel, with the aim of giving you enough understanding of the possibilities that you’ll be able to imagine your own app-specific modifications.
Hands-on code examples will include well-known Mongrel add-ons like mongrel_cluster and mongrel_upload_progress. Then we’ll tread onto the path less traveled with Comet-style push, statistics gathering, and custom management and configuration. And no discussion of Mongrel+Rails would be complete without looking at performance enhancements: fulfilling high-availability requests without invoking Rails, multi-threaded long-running requests, and memcaching direct from Mongrel.
We’ll also look at app-specific examples from Heroku’s codebase, including the Mongrel handler behind our in-browser Rails console, our Rails plugin hot-loader, our toolbar inserting output filter, and customization of static asset handling.
People planning to attend this session also want to see:
James Lindenbaum is a hacker and entrepreneur with a background in agile development and enterprise software consulting. He was a principal at Bitscribe, is a cofounder of Heroku, and is technical advisor to several startups. James loves open-source; his most recent project was Bitswiki. His OCD perfectionism got him hooked on the beauty of Ruby back in 2005, and he’s been an addict ever since.