Home Twitter Engineer Talks About the Company’s Migration from Ruby to Scala and Java

Twitter Engineer Talks About the Company’s Migration from Ruby to Scala and Java

Twitter is famous for its use of Ruby on Rails, but as it has scaled the service up it has migrated some of its code to other technologies. The company began by migrating its back-end message queue to Scala (which runs on the Java Virtual Machine), continued by rebuilding its back-end search in Java and most recently replaced its search front-end with a Java server.

InfoQ is running an interview with Twitter engineer Evan Weaver who explains more about the shift.

Here are a few interesting points:

  • The first class languages at Twitter are JavaScript, Ruby, Scala and Java. Soemtimes C is used as well.
  • The usage of Ruby is shrinking at Twitter as JavaScript takes over the front-end and JVM-based languages take over the back-end.
  • In general, developers at Twitter from a Ruby background prefer Scala, and those with a C/C++ background prefer Java.
  • The search team uses Lucene and is experienced in Java. Java is more convenient for them than Scala or Ruby.
  • Twitter uses a library called Finagle for building asynchronous RPC servers and clients in Java, Scala or any JVM langauge.
  • The move to Scala and Java at Twitter is driven more by a need for encapsulation than for performance and scalability and much of the existing Ruby code is quite workable for the time being.
  • Static typing has been a productivity boon as Twitter search has moved towards a service oriented architecture.

The interview also goes into more specific technical reasons for preferring Scala to Rails, such as better vertical integration. Weaver also talks about Twitter’s overall architecture, which was described in the talk we covered here.

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.