Tuesday, June 05, 2007

Rails Roko

I never follow any cult and nor do I despise any "particular" OS because every other geek in town does. But if I had to follow one, I would have joined a "rails-roko" cult :P. People argue that rails is in the same stage as Php was 9 years ago. Fine! I agree that things take time to stabilize but then you should not publicize it as the next big thing after bread!
Rails, the idea, is great. Web programming is mostly CRUD and having a framework that makes it all so easy should be encouraged. But then encouraging and supporting it one thing and marketing it as if it is enterprise ready is quite another.
Rails has a number of show stoppers like mongrels wake up issue, performance issue, freedom issues!.
I have tried to deploy a third party rails application in a production environment with "minor changes". These minor changes turned out to be monstrous. Switching to a only-cookie-based-system (to make the system scalable) turned out to be a nightmare. Now flash notices and errors don't work as they use sessions and I have completely disabled them. Running a mongrel cluster behind a apache frontend is also a big nightmare. Mongrels die (or go into deep sleep) overnight and wake up after a long time (~10 mins) after a page is requested. Per mongrel transaction count is also low.
It is very easy to do stuff in rails which result in a huge number of database queries like a 'forum.topic.post.last.created_at' in the view against each forum makes life miserable for the rails app as it first hits a method_missing in ruby interpreter and then rails tries to generate a function out of it after looking at all class declarations! and that is slow like anything. I switched it off and found that requests/sec count went up from 6-7 req/sec to a mind boggling 70-100 req/sec!
So all the marketing gimmicks are not going to work unless the stuff actually works!
More rails cribbing later

No comments: