15 Apr
Posted by Harper as Technology at 11:50 PM
Tags: Technology
I have a love and hate relationship with Ruby on Rails. I love what it does. I love the activerecord, I love how it makes designers and other non-software engineers into raving MVC lunatics. I really like coding in ruby and seeing how much work can get done by so little code. All of that is really exciting. However, I hate a lot about rails as well. I do not like that it is so slow. I don’t like that you use a reverse proxy and mongrel (I can’t put a finger on why I don’t like this - but for some reason I want to punch it). I really don’t like the fan bois who won’t listen to any reason when you criticize their first and probably only love. I don’t like how hard it is to scale. I really don’t like that the best known way to scale a rails app is by throwing more money at it. I am also still bitter about the not so smooth migration from .95 to 1.0.
In my book, I am more annoyed than happy with rails. So I stopped using it.
When I did stop using it, my servers were happier. After converting all my applications I converted to rails back to PHP - my server load dropped amazingly. I didn’t even have big applications. Maybe one app that had a couple 1000 visits a day. nothing too fancy. but the little traffic it had really abused my server. annoying. One side effect of the PHP migration is that my applications responded a bit snappier - which in turn generated more pageviews. It was magical.
I do have to say that I was sad to be back in the wild west of scripting that PHP is. I missed my MVC and my activerecord. However, I wasn’t about to sacrifice what rails took from me.
With all this said, It is kind of sad that twitter is getting owned so hard because they decided to use rails as their weapon of choice. It seems that they have assembled the biggest and most successful rails app on the Internet and are sustaining quite a number of pageviews. This is awesome. But ever since SXSW, where twitter seemed to pick up some seeming unstoppable steam, their growth has been the bane of their existence. I can’t imagine that new users are as impressed and interested in twitter when their experience is tainted by slowness and missing features. I wonder how this is affecting their continued growth?
So the other day, one of the twitter engineers had a really great interview about twitter, their growth and their future. It is very insightful and covers some interesting ground. It is always helpful to hear how other people are solving problems and it always helps the community to hear criticism and success. The interview had both of this. It explained how they had basically outgrown their ideas of growth and were dealing with scaling issues. He said that their issues were related to having too many mongrel connected to the database which was then killing things. This is not a new problem in the world of webapps. In fact, this very problem is where we at Threadless are having problems. And we are running PHP. OMG.
So obviously there is a performance hit when using rails. But there is a performance hit when using any interpreted language. And even more a performance hit when using a framework. and then it doesn’t help that ruby is slower. but these things don’t really mean that a site can’t scale. It just means that you have to solve the problems a bit more interesting (and being interesting might very well be moving to python).
This is rails chance to show the world that they can scale a real world app. That they are not second place to some weird guitar named framework. But I don’t think they will do that.
Personally, I think that the rails community blows. I think that they are not helpful and I don’t think they are willing to take criticism positively. I mean look at what erupted from this great developers smart interpretation of who his beloved application had scaling problems. The community rebelled and basically said that twitter needs to do the work themselves.
This is type of reaction is exactly my experience when dealing with rails. The difference that I experienced when I dealt with rails versus when I dealt with PHP, is that PHP people are like
“Oh yea. this is why this happened. check out the solution.”
or maybe they are like
“Oh shit. That is weird. Maybe try this. if you figure anything out let us know.”
but regardless of what the response nobody says:
“Obviously you are doing it wrong. Its probably your database. fix it. “
However, this is exactly how the rails community has responded to twitter’s issues. Nobody really constructively addressed the twitter issue. They all just waited until DHH said his word. and then blindly followed. They called the people who questioned trolls and then jumped into line behind DHH. The twitter people even came to DHH’s blog and apologized for possibly misconstruing that rails was slow. however, rails is slow.
I think some of the best points on this whole thing is the following (paraphrased from somewhere 1, 2, 3):
Rails is great because it trades developer performance for framework performance. Rails is good enough for almost every application. However, if you get big enough - rails will suffer. If you are writing an app that may get big, you may want to choose a different framework.
With that said, I am going to go play with web.py.
10 Responses
mh
April 16th, 2007 at 4:41 pm
1I love the suggestion halfway through the DHH post where he implies that this would be a great opportunity for the twitter people to contribute, like it’s your RESPONSIBILITY to contribute to the community when you encounter a scaling problem. This is basically the nightmare that every corporation throws out whenever someone recommends open source solutions that leads people to stick with large vendors. Not that large vendors are responsive either, but there’s that mythical culpability.
Ideally a company that is enthusiastic about the technology meets the framework developers halfway, but is it wrong for me to think that you should be able to wholeheartedly use and endorse a technology without taking on its development when there are others out there?
» Ruby y la burbuja deUgarte.com
April 18th, 2007 at 1:52 pm
2[...] aplicaciones web fuertes con Ruby on Rails tiene sus problemas. Mucho est?n sonando estos d?as los que sufre twitter y parece que hay un cierto consenso sobre los l?mites de la escalabilidad que bajo ciertos [...]
What I accidently learnt about programming » Open source Scaling Ruby vs PHP
April 19th, 2007 at 2:17 am
3[...] Harper Reed [...]
Andy
May 3rd, 2007 at 6:00 pm
4If you are big on the MVC design pattern and know PHP, why not give Code Igniter a shot? http://www.codeigniter.com I have used it on a couple of projects and am REALLY pleased so far. It is fairly new, but the community is epic. Lots of new development and great support/feedback. It has active record, and other goodies that Rails has.
Lenguajes de desarrollo web « Cosas sencillas
June 6th, 2007 at 12:40 am
5[...] y evitar que se repita código innecesariamente. Sin embargo, este programa ha presentado problemas de escalabilidad (es decir, capacidad para responder a una creciente demanda de usuarios) en sitios de gran éxito [...]
¿Ruby on Rails está muerto? | jRuby
October 25th, 2007 at 11:27 am
6[...] RoR hace lento a Twitter [...]
Rails and Wired magazine » Harper Reed: Tech, Phones, Yo-yoing and Death Metal
February 23rd, 2008 at 4:54 pm
7[...] I have blogged about this before. [...]
Sumit Khanna
April 21st, 2008 at 3:55 pm
8I have to agree quite a bit. I have a love hate relationship with Ruby on Rails too. It seems really nice and does a lot of stuff for you, but it is slow compared to my PHP apps, even apps built on bulky frameworks like Drupel.
I’m going back to PHP for new development, but I’m taking a lot of the concepts I learned from Rails (as well as some J2EE concepts) and making my own little / simple framework that is more tailored to what I need it to do.
Ruby on Rails is a nice box and a good environment to try to force programmers to write good MVC code, but try to build outside that framework, or interface with non-ruby databases and you get a lot of issues.
Also, I rather write my own SQL that use Active Record. I like writing SQL and looking through the logs, I always feel I could write better SQL than what they auto-generate.
PHP has been out much longer and there is so much stuff out there for it that still works in PHP5 even though it was intended for 4. Rails is poorly documented, the same stuff in Rails 1 doesn’t work in Rails 2 and the community feels as arrogant as the Debian junkies.
-Sum
Twitter Slowing WAY Down
May 21st, 2008 at 4:43 pm
9[...] Ruby on Rails be damned! [...]
mormon
August 11th, 2008 at 5:37 pm
10I agree that rails is slow. It really is. I think Ruby itself might even be fast, but somehow rails manages to slow it right down. Or maybe it is Ruby, I’m not sure.
Also I really agree with the quote that rails is good but “if you get big enough rails will suffer.” It will indeed. Thankfully, however most e-commerce sites don’t get slammed, so rails actually honestly is fast enough for them. Though I suppose it’s a little disconcerting what you noted about php being faster so getting more clicks. Wonder if it’s the prototype .js’s or something. Just my $0.02
RSS feed for comments on this post · TrackBack URI
Leave a reply
Be sure and take a gander at my photos.
If you want to contact me click here to start a chat.
Status
Pictures
Friends
Popular Tags
action awesome blogs books bush cell chicago chris colorado crobar dylan family food games google hacking harper hiromi humor india insane internet iraq job juggle juggling matiss metal movies music nokia phone php politic reed rock school search server sick Sites Technology travel video war
search
Categories
Archives
Recent Entries
Recent Comments
Most Commented
Nata2.org is © 1997-2008 Harper Reed. Theme stoled and inspired by the great BloggingPro theme by: Design Disease