Twitter Reportedly May Abandon Ruby On Rails 423
Raster Burn writes "According to TechCrunch, Twitter has plans to abandon Ruby on Rails after two years of scalability issues. Candidates to replace Rails are said to be PHP, Java, and Ruby without the Rails framework." The post links a brief comment (at 139 characters, probably a tweet) from Twitter founder Ev Williams saying it ain't so. The comments following the post embody the controversy over whether or not RoR sucks.
I'm surprised they didn't do it sooner (Score:3, Insightful)
Re:What is Twitter? (Score:2, Insightful)
Re:What is Twitter? (Score:5, Insightful)
Most popular things are useless.
Ruby Can't Scale (Score:5, Insightful)
Hype vs. reality... again. (Score:5, Insightful)
Rails was the cat's pajamas two years ago. The future. The in-thing. Revolutionary. Exciting. Radical. Amazing!
Then like so many similar times before, reality set in. It turned out to be buggy, unstable, less performant, and heavily dependant upon an evangelical base.
Ruby the language is interesting. Not my personal cuppa, but I have nothing against it. Rails, however... After having analyzed it and developed a prototype application for my company, I came to realize that there are other frameworks out there that are more worthwhile, epecially in an enterprise environment. The problems I've seen Twitter experience only solidify this.
If you are doing green-field development Rails should probably not be your first choice. Yes, Rails is interesting. No, it is not the end-all-be-all, and it certainly has some rather major warts.
Re:Does a clean architecture matter? (Score:3, Insightful)
That said, I don't really think that clean architecture and speed are orthogonal goals. Frameworks like Rails add overhead because they are general - they allow you to do all sorts of things on top of them, and still support all those things even when you're only using some of the functionality. You can maintain your clean design while improving efficiency. What you lose is the ease of adding new features, since you strip out the generality and agility of the framework.
Re:I'm surprised they didn't do it sooner (Score:2, Insightful)
Yeah, because message queues and SMS gateways and email-parsing daemons just write themselves, freeing you up to belittle things on Slashdot!
Re:Does a clean architecture matter? (Score:5, Insightful)
That would be the crux of it, as I read it.
The rails framework is aptly named. Its like driving a train. You follow the rails. Its easy, simple, and those are its strengths. But if one day, you decide you want to cut across a field save a few hours of travel, well, you probably shouldn't have chosen 'train' as your mode of transportation.
The simpler and easier a framework is the harder it is to change its behaviour in ways the designers didn't expect. Its like using Microsofts web rendering controls in an application... they are drag and drop simple to use and that's great. But if you want to tweak them so they handle a particular css element in a different way [read standards compliant way], its not going to happen. The -best- you can hope for is to pre-parse the document to rewrite it in a way that the rendering control will get the appearance right, because you are NOT going to change the rendering behaviour itself easily. Better by far to just switch to a different rendering engine.
Conversely the more robust a framework is, and the more hooks they give you to inject/alter behavior, the more complicated and bug-prone it is to develop with.
Rails is a trade off... great when it fits what you need, abysmal when it doesn't. And rails in particular from what I've heard is especially frustrating when its 'oh-so-close-but-not-quite' what you need.
Re:Does a clean architecture matter? (Score:4, Insightful)
On the other hand, if you spend all day pondering the ultimate architecture, you'll never ship and if you do you won't meet requirements. Learning where those tradeoffs are is all about experience and is why the engineers with over a decade of real world experience earn more.
I saw it on the Internets, it's true (Score:2, Insightful)
So, er... TechCrunch says "multiple sources claim that Twitter is abandoning RoR."
The guy who founded Twitter says, "no, not really."
And TechCrunch says, "but we have MULTIPLE SOURCES."
Guess what? I have MULTIPLE SOURCES that say the Earth is flat!
Must be a slow news day.
Re:I'm surprised they didn't do it sooner (Score:3, Insightful)
Twitter don't use Rails to handle most of that though, do they? I don't think drix is suggesting that they rewrite every piece of code they have, just the Rails portion.
Re:Does a clean architecture matter? (Score:2, Insightful)
It's a hard question to answer. On the one hand employees are expensive and hardware is cheap. On the other hand, you can't simply forego developing for performance just because of some religious belief that architecture should be clean.
When developers say "Hardware is cheap" in response to poor architectural choices, what they're really saying is that "Our hardware costs are externalized".
This has little to do with "speed, memory, and response time at all cost", and everything to do with architecting for your problem space, avoiding grossly inefficient architectures -- you must model the natural concurrency of the system, use only the RAM you need to get the job done (not the RAM you need to run 50 duplicate interpreters), etc.
The basic architecture of shared nothing, fork()-based scaling in Rails is flawed in this regard, and that has little to do with developer productivity and everything to do with poorly thought out architecture, and poorly implemented abstractions.
Re:Ruby Can't Scale (Score:1, Insightful)
No threading or service module notion. Everything is tied to servicing a web page. Long lived jobs mean long lived web page renders. It also forces you to scale via page hits scaling rather than in other ways. There are more fined grained ways to break tasks up to scale.
Ruby itself is kind of pokey at a lot of things. Sure it's "fast enough" for a lot of things too but are you sure its "fast enough" for the things you intend to do? Or will you write them in some other language and then interface and shim it in? Which may make it perform faster but take a different amount of development time. The scaling of dev time is also a variable, not just the upfront zero to a database CRUD time, but zero to a delivered product time and then the next release time.
The short of it, if you ask me, is a more fundamental issue: it's just not built for big tasks. The architect(s) of Rails approach enterprise software and the various technologies to build it with disdain and look at it like a lot of meaningless engineering for the sake of engineering. There is definitely a dose of that that actually exists in the world but you're a complete fool if you think that the industry as a whole has arrived where they are in that regard without need. There are a lot of high volume, high performance j2ee systems out there that don't do a lot of exotic things; there are no high performance Rails sites that don't do almost everything in an exotic fashion. That all begs the question to me... There is no "Rails way" to do high performance. Unless that means completely unconventional and custom.
That being said, fire up Rails or Grails [codehaus.org] (if you go that way) and bang out some AJAX enabled CRUDs and I promise you, you'll fall in love with it. Compared to setting up some EJB (pre v3) and building some servlets, it's a fucking dream.
Re:Ruby Can't Scale (Score:3, Insightful)
If the language were a problem, then Ruby without Rails wouldn't be an option, now would it? Think about that, genius.
And actually, I'm not a ruby developer. Nice try though.
Re:What is Twitter? (Score:5, Insightful)
Unless you are claiming there are a substantial percentage of folks who use twitter but don't use email. I'll want citations for that though, because I don't believe it for a minute.
Re:The problem is ruby (Score:3, Insightful)
Comment removed (Score:3, Insightful)
Re:What is Twitter? (Score:2, Insightful)
6 of 1, half a dozen of the other. Sorry, I just don't see any amazing reason to use twitter over email for that kind of stuff.
Re:What is Twitter? (Score:5, Insightful)
Actually, all of these free social networking services have figured out how to monetize it.
Twitter is the honeypot to collect a group of users. After a density of users is reached, larger communication companies will start looking at purchasing Twitter so they can "integrate" their service. Nevermind that integrating a free service with an available API doesn't require purchase.
What the larger company is actually doing is buying customers.
From the TOS:
It's the web 2.0 business model, all coated in a lovely veneer of altruistic "doing it for the love of geekiness" bullshit.
Re:What is Twitter? (Score:4, Insightful)
For a medium to large site they should consider using servlets and java and avoid J2EE.
For a very large site I would recommend C/C++ and maybe java if they have the budget for hardware.
The toughest part is getting developers that can code webapps (not just CGIs) in C/C++ (while easy to do C/C++ developers overall are hard to find and are not as cheap as ruby/perl/python ones and even java ones; this is from experience of trying to hire them). So they should check their developer base and see what is the fastest language they feel very comfortable with and go with it. From experience they may have to settle for java since that will provide them a large pool to pick developers from and the learning curve is slightly less steep than C/C++.
I suspect they fell into the trap of building a demo fast using RoR and then just going with it into production, I have seen this way too many times unfortunately.
Re:Does a clean architecture matter? (Score:4, Insightful)
I've never seen anything saying otherwise.
Follow any of these sets of rules:
http://c2.com/cgi/wiki?RulesOfOptimization [c2.com]
http://schwern.org/~schwern/talks/What_Works/What_Works/slide016.html [schwern.org]
http://www.cs.cmu.edu/~jch/java/rules.html [cmu.edu]
Or my version--
1) Don't optimize, no really, don't.
2) If you absolutely have to, write it unoptimized, test it, write it optimized, then:
2a) If the first is anywhere in the ballpark, throw away the second,
2b) If the second has enough of a proven, documented speed gain to get you past some accept/no accept barrier, comment out the slower one, but keep it so the next guy can follow the "Good" code.
If you don't document exactly what you did in the code and why, I'm going to refactor it into something readable the second I see it.
Also--know how to program. Choosing a linked list instead of an array list for an insertion sort is just programming correctly. It's not an optimization.
-1 offtopic... Just wanted to help the parent out with his cow-orker.
Re:Follow the script (Score:4, Insightful)
And indeed, your experience differs a lot from that of thousands of web developers. Perl in particular had been called the Duct Tape of the Internet.
Speaking of Perl, I notice that your complaint it is not that it's slow, but that it's hard to support. That's a legitimate complaint, but it says nothing about the relative efficiency of scripting languages.