I've been deep in this world for the past few weeks, as I've spent my spare time more-or-less implementing an event system for Ruby... partly because Thin doesn't work on JRuby, and partly because EventMachine is almost totally undocumented. And it doesn't play too well with other multithreaded code on the same VM.<p>The performance of the Rack bit is on a par with Thin, even without an optimized request or response parser, and I've got about 1/6 the code of just EventMachine alone. But I digress.<p>While I've come up with a few solutions to the 'breaking code into little chunks' problem, nothing really beats having event-driven I/O built into the runtime, and nothing has driven that point home better than implementing an event system<p>And yeah, I'll be open-sourcing it in the near future... want to mop up some of the internals a bit, add MRI support, and finish stealing every spec and unit test that I can from other Rack webservers.