Twitter Replacing Rails? So?

Sat Apr 09 21:25:00 -0700 2011

Twitter are reportedly moving away from Ruby on Rails. It’s on a lot of people’s tweets and on our Rails Oceania Mailing list. But the real question that should be asked is “So?”

Ruby on Rails is a tool for a job. I run a Ruby and Ruby on Rails consulting firm and we use Ruby and Rails to do one thing extremely well, that is rapid, highly customised, web application development. We can produce applications that fit very complex business models at break neck speed.

These same applications can then go on, with little or no modification mind, to serve more requests than ninety nine point lots of nines websites will ever need.

But one thing that Ruby is not suited to is highly concurrent, speed optimised computing. It’s not designed to. Ruby’s stated design goal by Matz (paraphrasing) is programmer happiness and help change the way us programmers think by providing a language that allows us to express our ideas and thoughts rapidly, elegantly and simply.

If you want something insanely fast, highly concurrent and optimised to the gills for speed, use something that is not Ruby, maybe Erlang, Scala, C, whatever.

If you need a web site developed that is on budget, has a really great development curve and delivers highly productive and successful web applications in the shortest possible times, use Rails.

I think the real surprise should not be “OMG, Twitter is moving their search feature away from Rails!” I think the point is “OMG, Rails has managed to run twitter’s search feature successfully for THIS LONG?!”

blogLater

Mikel

  1. aokuneosrm Says:

    Your post is one of the nice posts I have ever read. The conversation itself proved that your article is quite a treasure. Keep on posting more insightful posts.
    Our company is professional manufacturer, specialized in carbide drill ,solid carbide end mills, reamer, drills, indexable inserts and other tungsten carbide products. We produce the products which is mentioned above by ourselves.

  2. Alexandre de Oliveira Says:

    1 billion queries/day is a lot, indeed, and Ruby/Rails managed to withstand for this long.

  3. Eaden Says:

    Good post, especially “OMG, Rails has managed to run twitter’s search feature successfully for THIS LONG?!”

    PHP is complied into c++ at facebook. When you get to ‘web scale’, which has more than a few orders of magnitude more requests than you’re average web app, you gotta do things differently, no matter the language.

  4. Joshua Says:

    OMG, it took twitter this long to realise Rails is not for highly concurrent computing? j/k

    So does that mean we rewrite the code like twitter does if the customer’s website suddenly get high traffic?

  5. Eaden Says:

    Good post, especially “Rails has managed to run twitter’s search feature successfully for THIS LONG?!”

    PHP is complied into c++ at facebook. When you get to ‘web scale’, which has more than a few orders of magnitude more requests than you’re average web app, you gotta do things differently, no matter the language.

  6. Marcelo Silveira Says:

    Great article. A bit of sanity in this usually passionate matter.

  7. JK Wood Says:

    @Joshua

    Sudden high traffic isn’t a good reason for rewriting the entire web application. Sustained high traffic is.

    Also, it’s a question of multiple concurrent operations, not just high traffic. Using the right tool for the job is important in web development – if all you’re serving is static html content, Rails really isn’t that great a solution for you, either.

  8. Eaden Says:

    Good post, especially “Rails has managed to run twitter’s search feature successfully for THIS LONG?!”

    PHP is complied into c++ at facebook. When you get to ‘web scale’, which has more than a few orders of magnitude more requests than you’re average web app, you gotta do things differently, no matter the language.

  9. Prog Says:

    How bout jRuby? Rails is designed to be thread save. jRuby on Rails!

  10. James Kirk Says:

    I remember the time when you were supposed to use Rails because Twitter was using it. Now we have to write blogs like this when they move off it. Sad.

  11. Prog Says:

    How bout jRuby? Rails is designed to be thread save. jRuby on Rails!

  12. Prog Says:

    How bout jRuby? Rails is designed to be thread save. jRuby on Rails!

  13. Roshan Shrestha Says:

    Actually, Twitter search was moved to Java last year (using Lucene). This time it is the “web front-end” which is being replaced with Java.

  14. @SusanPotter Says:

    @Prog: We shouldn’t confuse thread-safe with event-driven (or “evented”) I/O. The latter is what Netty (the Java framework Twitter is now using on the search front-end) is based on.

    Other terms used for event-driven I/O are:

    • asynchronous I/O
    • non-blocking I/O

    You can find out more on various I/O strategies here:
    http://www.kegel.com/c10k.html

    HTH,
    Susan

  15. Niels Bom Says:

    Twitter has been using Scala for (parts of) their backend since 2008.

    Source: http://www.artima.com/scalazine/articles/twitter_on_scala.html

  16. Tom Myer Says:

    Twitter changed their interface from a more or less “classic webpage spiced up with ajax” to “ajax only”! Adapting this on the server side is a natural step and absolutely necessary as this changed to a “request per click”-model. Furthermore we´re talking about TWITTER – one of the request heaviest pages on this planet! You definately would run into issues and special needs regardless of technology… it has absolutely nothing to do with the quality/speed of Ruby/Rails! Therefore: Full ack to Mikel!

  17. carbide drill Says:

    Your post is one of the nice posts I have ever read. The conversation itself proved that your article is quite a treasure. Keep on posting more insightful posts.
    Our company is professional manufacturer, specialized in carbide drill ,solid carbide end mills, reamer, drills, indexable inserts and other tungsten carbide products. We produce the products which is mentioned above by ourselves.

  18. carbide drill Says:

    Your post is one of the nice posts I have ever read. The conversation itself proved that your article is quite a treasure. Keep on posting more insightful posts.
    Our company is professional manufacturer, specialized in carbide drill ,solid carbide end mills, reamer, drills, indexable inserts and other tungsten carbide products. We produce the products which is mentioned above by ourselves.

  19. dfhg5ddf Says:

    Good post, especially “Rails has managed to run twitter’s search feature successfully for THIS LONG?!”ikpdjnvaj sg qqyjivwzl hg qtaowcahr te onpins

    PHP is complied into c++ at facebook. When you get to ‘web scale’, which has more than a few orders of magnitude more requests than you’re average web app, you gotta do things differently, no matter the language.

  20. mallorca property Says:

    why did you chose to start a ruby on rails company, instead of asp.net? I find it more complex

  21. italy yacht charter Says:

    I guess that this is the future for promotion. Online marketing seems to be the best approach. And I am sure that you will have the same opinion.

  22. Alimentação Says:

    Good Work ! Keep on posting more insightful posts. Thanks!

  23. sailing Says:

    PHP is complied into c++ at facebook. When you get to ‘web scale’, which has more than a few orders of magnitude more requests than you’re average web app, you gotta do things differently, no matter the language.

Leave a Reply