Open Source Akka JVM Toolkit for Concurrency and Scalability Turns 5
Typesafe this month marked the five-year anniversary of Akka, its open-source run-time toolkit for concurrency and scalability on the Java Virtual Machine (JVM).
Written in Scala and used to build highly scalable, fault-tolerant applications in both Scala and Java, Akka has gained serious traction since Swedish programmer Jonas Bonér pushed out the first public release (v.05) on July 12th, 2009. The company now includes some big names on its Akka user list, including Amazon, BBC, Cisco, Credit Suisse, eBay and more.
Bonér, who is Typesafe's CTO and co-founder, had worked for years building compilers, runtimes, and open source frameworks for distributed apps. Somewhere along the way, he says, he became "fed up" with the scale and resilience limitations of CORBA, RPC, XA, EJBs, SOA, and the Web Services standards and abstraction techniques Java developers typically used.
"It started to dawn on me that it wasn't that we were using the wrong tools," Bonér told ADTmag. "It was a fundamentally wrong approach to building software."
A better approach, Bonér concluded after "tinkering" with the Oz and Erlang languages, was the Actor Model, which utilizes objects that encapsulate state and behavior. Each actor also has a mailbox, and communicates exclusively by exchanging messages placed into a recipient's mailbox. This model provides a unified, single abstraction over concurrency and distributed computing. And an Actor's behavior can be redefined at runtime.
"I found the Actor Model to be a really good basis for building this next generation middleware," Bonér said. "And I could see that we needed to bring them over to the JVM."
Akka is one of the technologies emerging around the concept of reactive applications, described in "The Reactive Manifesto" as apps that better meet the "contemporary challenges of software development," in a world in which applications are deployed to everything from mobile devices to cloud-based clusters running thousands of multicore processors. Bonér wrote the first version of manifesto, which defines the four "critical traits" of reactive apps: event-driven, scalable, resilient, and responsive. By embracing these traits, the manifesto asserts, developers produce apps that are highly responsive to user experiences, provide a real-time feel, and are backed by a "scalable and resilient application stack" that can be deployed just about anywhere. A number of others contributed to later drafts of that manifesto, including Typesafe's other co-founder, Martin Odersky, who created the Scala language. That list of contributors also includes Erik Meijer, Greg Young, Martin Thompson, Roland Kuhn, James Ward, and Guillaume Bort. Since it was published, hundreds have "signed" the manifesto.
Odersky created Scala, a general purpose, multi-paradigm language that runs on the JVM, to integrate features of object-oriented programming and functional programming. Typesafe is also responsible for the Play Web app framework, a development and runtime environment billed as "a clean alternative to legacy Enterprise Java stacks." Play compiles Java and Scala sources directly and "hot reloads" them into the JVM.
In 2013 Typesafe acquired of Spray.io, a suite of lightweight Scala libraries that provide client- and server-side REST/HTTP support on top of Akka. The company hoped to broaden the appeal of the Typesafe Platform to Java developers with "one of the best performing REST/HTTP libraries in the Java ecosystem," Boner said.
The Akka team, which now comprises six members ("It's a good size," Boner said), shipped version 2.2 in July 2013. That release included full support for clustering. In October of that year, the team introduced Akka Persistence to allow stateful actors to recover from JVM crashes "in a way that Actors themselves are persisted in memory," the company explained. In April 2014, Typesafe unveiled early preview releases of two projects designed to improve data streaming on the JVM: Akka Streams and Reactive Streams (ADTmag coverage here).
Typesafe has posted an infographic of the history of Akka that shows its evolution, the influence of Scala Actors on its development, the Oz/Erlang connection, the emergence of the Akka Persistence module, and all the creative people involved—not to mention how it got its name. (Hint: It's not an acronym.)
Posted by John K. Waters on 07/14/2014 at 4:33 PM