Yammer banks on Scala, ends up moving to Java

Infrastructure architect's email to Scala execs points out pitfalls and breakthroughs of adopting a young programming language

Sometimes trying a new technology works out great. And sometimes it doesn't.

Yammer, which bills itself as the "enterprise social network," had tapped Scala, a general-purpose, statically typed language on the Java Virtual Machine, for high-performance back-end services. But in a recent email to executives of Scala middleware vendor Typesafe, Yammer infrastructure architect Coda Hale pointed out problems Yammer had been having. Hale advised Typesafe chairman (and Scala founder) Martin Odersky and CEO Donald Fischer that Yammer would switch to Java.

"Right now at Yammer, we're moving our basic infrastructure stack over to Java and keeping Scala support around in the form of façades and legacy libraries. It's not a hurried process and we're just starting out on it, but it's been a long time coming. The essence of it is that the friction and complexity that comes with using Scala instead of Java isn't offset by enough productivity benefit or reduction of maintenance burden for it to make sense as our default language," Hale wrote. "We'll still have Scala in production, probably in perpetuity, but going forward, our main development target will be Java."

Subsequently, in an official Yammer blog post, Hale softened his stance and pointed out there are issues with all languages. "The fact that I described some of our team's negative experiences with Scala was misrepresented by some as constituting an official Yammer position or announcement. It was not; it was a private email." Yammer, he said, has solved a number of hard problems using Scala. The company has built a real-time message delivery service with Scala, as well as a distributed data store for message feeds, a search system, a server for integrating with Active Directory, a notifications service, and an OAuth token service.

In the blog, Hale said Yammer found some tasks Scala was not good at and noted it was a relatively young language. But in his private email, Hale said the "development story was never as easy as I'd thought it would be." He added, "Because one never writes pure Scala in an industrial setting, we found ourselves having to superimpose four different levels of mental model -- the Scala we wrote, the Java we didn't write, the bytecode it all compiles into, and the actual problem we were writing code to solve." Also, Yammer had difficulty finding people with Scala experience.

In response, Typesafe posted a blog entry citing growing pains and successes for Scala. "No doubt, there's tremendous room for improvement in Scala, on many fronts. And we are hard at work. But at the same time, Scala is used in production today with great success by many major companies ranging from global financial services firms to Web leaders like Twitter, LinkedIn, and -- yes -- Yammer."

But that positive spin doesn't change the fact that, although Yammer made headway with Scala, the company still is switching to the more seasoned, 16-year-old Java platform. Yammer's experience provides a good illustration of the trials, tribulations, and even successes of trying out something new. Yammer's experience also shows that there is no magic solution for every problem.

This story, "Yammer banks on Scala, ends up moving to Java," was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

From CIO: 8 Free Online Courses to Grow Your Tech Skills
Join the discussion
Be the first to comment on this article. Our Commenting Policies