Twitter Reportedly May Abandon Ruby On Rails
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.
How complex can Twitter be on the inside? In the 1.5 years they've been publicly grousing about Rails they could have redone it ten times over.
I think there is a world market for maybe five personal web logs.
They're a very high volume site.
Most popular things are useless.
And for all those Ruby people in denial to the fact that people have been saying this for years, here is your proof yet again. Of course I will be marked down as being a troll for pointing this out by the RUBY comunity but it is time that they acknowledge the inherent achilles heel of the language.
This is my sig. There are many like it but this one is mine.
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.
I think Twitter has probably done it right: use the clean architecture to build the app cleanly and quickly, then put developer cycles into making it fast and efficient, possibly losing some of the niceness of the architecture in the process.
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.
On the other hand, perhaps the bottlenecks are somewhere inside the Rails framework, and the Twitter team thinks that it'd be simpler to move to a new framework than to invest the effort to fix Rails.
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.
While system responsiveness is often a product of optimization, scalability rarely is. When a system can scale across orders of magnitude, it's because of a clean, maintainable architecture that allowed components to be completely revamped and swapped in, identified and eliminated high-polynomial (or worse) growth patterns, and allowed more developers to be spun up on it fast enough to keep up with demand.
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.
E pluribus unum
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.
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. This position presents a false dichotomy: a choice between achieving passable performance through good design, versus optimizing for developer efficiency. Efficient use of resources and ease of development are not mutually exclusive -- why should they be?
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.
Or you could just email them all.
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.
I know it isn't considered trendy,although "Good Old VB6" is still in the top 5 of programming languages(number 3 to be precise) and as long as you aren't trying to build some gigantic multi-use program it really works great. Of course I've been using BASIC since the days of the VIC 20(recording my programs to a cassette,boy THAT was fun) so for me it just works.YMMV of course and I've known guys that can do the same in Java,C++,etc. IMHO if it does the job you need it to and the customers are happy I say go for it.
ACs don't waste your time replying, your posts are never seen by me.
Instead they are tied to a twitter site. imagine that!
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.
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: Business Transfers Twitter may sell, transfer or otherwise share some or all of its assets, including your personally identifiable information, in connection with a merger, acquisition, reorganization or sale of assets or in the event of bankruptcy. You will have the opportunity to opt out of any such transfer if the new entity's planned processing of your information differs materially from that set forth in this Privacy Policy. Build Service - Grow Userbase - Sell Demographic data.
It's the web 2.0 business model, all coated in a lovely veneer of altruistic "doing it for the love of geekiness" bullshit.
Personally I would never run a high volume site on top of a scripting language platform. While RoR is pretty nice on getting a site up and running and integrated with a database, it is still poor in the scalability department.
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.
Premature Optimization is the root of all evil.
I've never seen anything saying otherwise.
Follow any of these sets of rules:
http://c2.com/cgi/wiki?RulesOfOptimization
http://schwern.org/~schwern/talks/What_Works/What_Works/slide016.html
http://www.cs.cmu.edu/~jch/java/rules.html
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.
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.