Oh dear. The chattering classes are at it, talking about how the Twitter folks are dissing Ruby by announcing the replacement of some Ruby code with Scala code.
Please stop.
At the kinds of volumes that Twitter handles (and with what I assume is a somewhat scary growth curve), Twitter needs to improve concurrency—it needs an environment/language with low memory overhead, incredible performance, and super-efficient threading. I don't know if Scala fits that particular bill, but I know that current Ruby implementations don't. It isn't what Ruby's intended to be. So the move away is just sound thinking. (I suspect it also took some courage.) I applaud Alex and the team for this.
Instead of defending Ruby when it's clearly not an appropriate solution, let's think about things the other way around.
The good folks at Twitter started off with Ruby because they wanted to get something running quickly, and they wanted to experiment. And Ruby gave them that. And, what's more, Ruby saw them through at least two rounds of phenomenal growth. Could they have done it in another language? Sure. But I suspect Ruby, despite the occasional headache, helped them get where they are now.
And now they've reached the status of world-wide wunderkind, it's time to move on.
I for one wish them luck. I look forward to the day when our online store reaches the kind of size where we have to move away from Rails. I'll tweet the fact with a tear in my eye, while my yacht sails me off to the sunset.
Dave my objection is almost entirely a semantic quibble. I think part of the blog over-reaction is the idea that using any other language constitutes abandoning Ruby. But you must understand where I got the idea, you have it in your headline. ;-)
Anyway, quibbles aside, just a further note: when people asked DHH about scaling, in the early days of Rails, he said isolate your bottleneck and offload that to a more performant language. His specific example was when Jamis Buck rewrote part of Basecamp or Campfire or something in C. What Twitter is doing is literally *exactly* what DHH recommended from the get-go. I think I heard him say it in Vancouver in 2006.
Posted by: Giles Bowkett | April 09, 2009 at 05:36 PM
Sorry, but I have to agree with Yehuda. The flippant quote in the MIT Tech Review about Rails being fine for "clicking around web pages" adds some context to the row as well. So while I also look forward to the day Ruby afficionados don't feel the need to be so defensive about their language, I also look forward to the day when people can move away from Ruby for a given application without feeling the need to minimize it on the way out.
Posted by: Christian Romney | April 09, 2009 at 07:59 PM
Yehuda, I have to disagree with you. If this is the article everyone's referring to (http://www.artima.com/scalazine/articles/twitter_on_scala.html), then there's nothing in here about the Twitter guys dissing Ruby for being Ruby. In fact, they mention several things that Ruby has done really, really well for them. Like Steve Jenson: "We find Ruby and Scala are very complementary. We use Ruby, actually specifically Rails, for things that it is very strong at. All the front end stuff that it does very well." There are certainly reasons why they picked Scala over something like using JRuby, and I'm certain they didn't feel the need to justify everything in that article.
Best of luck to the Twitter folks.
Posted by: Clinton Judy | April 09, 2009 at 10:36 PM
Scala brings an amount of productivity equal to Ruby, while bringing to the table several great features(Actors, Inferred static typing,etc).
Alex arguments are fine. I've seem benchmarks that showed Scala code to be even faster than Java in some scenarios. Jruby, Groovy, Jython are way too inefficient specially for intensive tasks such as MQs.
One thing I agree. For twitter people to be writing their own MQ app is complete insane. There are already several great open MQ solutions.
Posted by: Alexei | April 10, 2009 at 01:40 PM
@Clinton: http://www.technologyreview.com/blog/editors/23282/?nlid=1908
"The user interface runs on Ruby on Rails, which is "fine for people clicking around Web pages," he says. But by the end of the year, Twitter hopes to have a set of services in the back end that are written entirely in Scala."
*That's* the part that I think is glib.
@Alexei:
I'm learning Scala, and I've found much to like. It seems to be a wonderfully powerful language, but I've not found it to bring "an amount of productivity equal to Ruby".
Of course I concede that YMMV, and that the difference may be attributed to my being more familiar with Ruby than Scala at the moment. But my gut feeling is that it's probably got more to do with the relative surface areas of the two languages.
Scala's got a lot of stuff in the language proper that most other languages have in their libraries. I think it makes the learning curve much higher than, say, Clojure or Ruby.
Posted by: Christian Romney | April 10, 2009 at 02:40 PM
Twitter guys must not have expected such growth. Should i say, they made a blunder by opting Ruby!!!
Posted by: Rakesh Juyal | April 16, 2009 at 12:24 AM
Companies who are making the platform decision for a new site are always imagining that they will quickly become the next Twitter, so they reject Ruby/RoR right off the bat, maybe based on reading this news.
This is a terrible decision, since speed to launch is usually far more important, and the chances of becoming huge are just a tad remote. What is sure is that if you don't deliver a product, you won't become huge. If it happens, and your site blows up, you can probably afford to do some new development to speed things up.
If I were doing a startup effort right now, I'd think that RoR would be an ideal choice, especially considering that due to it's popularity there are new choices coming to light almost weekly. The rate of innovation around ruby is pretty astonishing.
Might you make an argument (or a reasonable bet) that ruby will gain capability as you need it (kind of just-in-time)? Again, assuming that you don't become the next Twitter overnight, but follow a sane growth curve, mainly because you can afford to be responsive to business changes.
Working on major sites in RoR, I've been pleased to see this just-in-time innovation happening already. Ruby certainly isn't perfect, but the ability to translate requirements to functioning code quickly outweighs many of it's disadvantages. I feel like using ruby is being on the crest of a very big wave.
Posted by: Robb Broome | April 16, 2009 at 09:31 AM
languages don't scale--architecture scales. if twitter was having *performance* problems, then the language might be the problem. but they're having scalability issues. no language will solve that problem, it's an architectural problem.
Posted by: tinou bao | May 02, 2009 at 10:44 AM
Unfortunately I dont' believe Ruby will be there big time in 10 years from now i.e it will still be a small niche player.
I have played with ruby myself a little bit, on and off since 2006 , I know I am a late comer. these are my thoughts about Ruby.
1) after so many years, it's still like 2% in the Tiobe ranking
2) its weak typing, many people have said this is an asset, but I don't. agree. Weak typing is a dsadvantage in my experience (working with very large apps in a big Financial Institution, running 24x7 ). Rubyists have always countered with a "do more testing" approach , but I don't agree this will catch all your problems. I believe you have to have strong typing combined with a "do more testing" approach is better, especially when you are working in large teams where every one can touch any code.
3) speed is still a problem after so many years, everyone knows it's a problem and yet the community is so slow to address that.
4) by the time, the ruby language and framework, has fixed its problems, the fad will have died and tne crowd will have moved on to the next big thing.
5) features in ruby is being and will be copied in existing languages and new languages
6) there are too many ways of doing the same thing in Ruby and this is a disadvantage as well, as this means if you are working in a big team, you have to learn every little nut and bolt of the language to be able support an application. that means, the learning curve is actually higher. In a one man team this is ok, because that one man picks one style and sticks to it and doesn't have to worry about other people's coding. It's like driving on the street, you don't have to think if the car next to you is going to drive left or right, and this prevents accidents. can you imagine for one moment that people are allowed to drive left and right in any direction ? what will happen?
I am aware that Saphire is trying to redo Ruby, with only one way of doing things. maybe this will help.
7) I think it's safer in terms of longevity of languages, to stay with Java and .net. because at some point Ruby will be forked and a new variant with a lot of differnt things added, will come out, fragmenting the market even more, which will reduce the current 2% to even less.
8) the big institutions are not doing Ruby. only startups, with basic CRUD applications form the majority of ruby's deployment.
9) the community looks and acts too amateurish.
10) last but not the least, the absence of a specification hurts the language. by the time the specs will come out and "accepted" by the community, it will be too late. Other " newer" languages like Scala will already be better established, further reducing the need for ruby.
anyway these are my thoughts. sure people may disagree with what I said, but every one is free to one's own opinion. Let's wait and see, only the future will tell whether one is right or not
anyway these are my thoughts.
Posted by: chris | June 21, 2009 at 12:26 PM
Why don't use Eiffel?
Posted by: TestEiffel | November 05, 2009 at 07:42 AM