I just realised that I’m split right down the middle when it comes to my opinions on Rails (on Webrick or Mongrel). It’s Ruby affiliation and it’s convention based generator framework is simple elegant and excellent – to the extent that it’s eased me back into the hacking saddle after a 7 year trip around the management wilderness – bereft of the simple ‘truth’ that code brings to one’s life. That aside – my love of rails is perpetually fire-bombed by knowledge that however you want to cut it, it’s single-threaded ! Yes that’s right folks…only one of your controller actions will ever be in operation at any one time ! There are, however, tentative claims that if you hold your breath, unset a few cryptic, undocumented booleans, then if you don’t whilstle on a Tuesday, it might just let you add some concurrency….so that’s a no then!
I want to love rails more…..but it just won’t let me. You see the fact that it is a single threaded process, taking one request at a time from the underlying Ruby socket stack, sort of makes me start wondering about how such a thing could have come into existence? The concurrency bit is where I’d generally start when developing stuff which is destined to serve clients. Not knocking rails overall, but until this thorn is removed from my side, I’m never gonna find true rails-love!
Currently, server concurrency is achieved by sitting a load-balancer across a group of explicitly created rails processes (mongrel_cluser for example)…..but whilst that is an entirely serviceable concept, it just errodes my perception of this slick framework. I’m just in disbelief that up to rails version 2.0.1 and mongrel version 1.1.1 it’s still single threaded as a result of not being thread-safe ?!