Writing Concurrent, Scalable, Fault-Tolerant Systems with Akka 1.0

A Conversation with Jonas Bonér

by Bill Venners
February 20, 2011

Summary
Jonas Bonér, the lead developer of Akka, discusses the goals of Akka and the recent Akka 1.0 release.

Bill Venners: What is Akka?

Jonas Bonér: Akka is a platform for writing event-driven, highly concurrent, scalable, fault-tolerant systems on the JVM. Generally I find it is too hard to build correct highly concurrent, really scalable, and also fault-tolerant systems using the state of the art tools that we have today. It has been a common theme throughout my career that it is too hard to build these things. The vision of Akka is to provide a simpler way of writing correct and also performant concurrency, scalability, and fault-tolerance in one unified programming model. Akka tries to unify these three core pillars of writing scalable systems—concurrency, scalability, and fault-tolerance—for writing scalable systems into one programming model and one runtime service.

We borrowed heavily from good ideas around computer science. We borrowed, for example, actors from Erlang. That forms a foundation of Akka, both in terms of concurrency and scalability. Remote actors are an excellent tool for doing almost transparent location, independent distributed computing and also for fault tolerance in which we embraced the "let it crash" supervisor hierarchy model, in which the system can watch itself and repair itself as it's running—self-healing in a way. Akka is not a framework, it's more of a toolkit, because we have different abstractions and tools that help people scale the systems. You don't need to use all of them. If you don't like actors or if actors don't solve the problem, we have other concurrency abstractions: software transactional memory, agents, data-flow concurrency. Usually you need to mix, no one tool solves all problems.

Bill Venners: How would I recognize myself as a potential user of Akka? What kinds of problems would I be facing? What kinds of applications would I be building?

Jonas Bonér: We have a wide range of domains and use cases. We could look through the domains first. We have deployments in finance banking, betting and gaming, telecom, simulation, television and media, ecommerce, and classic social media sites. The common theme through all these interest groups is the systems are highly transactional, need high throughput and low latency, and have pretty high SLAs in terms of availability. Classic use cases like transaction processing systems, reliable service systems, enterprise integration platforms. People are starting to use event driven architectural stuff like CQRS, and complex events processing goes hand-in-hand with that. Also applications like grid computing and the classic divide-and-conquer style where you need to analyze large data sets and, both utilizing hardware on a single matchine and spreading computations out across a cluster. And batch processing is another one.

Bill Venners: So the common theme you said was high throughput, low latency, scalable systems. What about the 1.0 release of Akka, what's significant about that?

Jonas Bonér: It's been what we've been working on the last two years. I started about two and a half years ago thinking about it. I started writing code about two years ago and one and a half years ago I announced it in public. And after that it's been a team effort. This 1.0 release materializes the vision I had when I started it. We probably could have released 1.0 a little earlier. It's been in production, the longest, for eighteen months. It's been 1.0 in terms of stability for a while. But I had this vision of this feature set. It has evolved, in that we have been changing the APIs and deprecated things pretty frequently. After 1.0 we'll stabilize and not do that as much. The last release was 0.10, and that was in August. There have been a lot of changes since then, a lot of new interesting features and also improvements have been made in the last half year.

Bill Venners: What languages does Akka work with?

Jonas Bonér: Akka works fine with Java as well as Scala, providing the same feature set and the same semantics in both Scala and Java APIs. Perhaps because Akka was born out of the Scala community, most of the production uses are using the Scala API. I only know of five that are deployed using the Java API, but over twenty are deployed in production using the Scala API.

Resources

Akka can be found at:
http://akka.io/

GitHub for Akka can be found at:
https://github.com/jboner/akka

Talk back!

Have an opinion? Be the first to post a comment about this article.

About the author

Bill Venners is president of Artima, Inc., publisher of Artima Developer (www.artima.com). He is author of the book, Inside the Java Virtual Machine, a programmer-oriented survey of the Java platform's architecture and internals. His popular columns in JavaWorld magazine covered Java internals, object-oriented design, and Jini. Active in the Jini Community since its inception, Bill led the Jini Community's ServiceUI project, whose ServiceUI API became the de facto standard way to associate user interfaces to Jini services. Bill is also the lead developer and designer of ScalaTest, an open source testing tool for Scala and Java developers, and coauthor with Martin Odersky and Lex Spoon of the book, Programming in Scala.