Why I Love Akka: Video With Helena Edelson
See why Helena Edelson, Principal Engineer, speaker, and community leader, describe why she likes building systems with Akka, and why it's the right match for cloud native applications. Note: some edits have been made to transcript below to improve flow and readability.
"What sets Akka apart from traditional event-streaming platforms is that your code actually runs in the event stream as the event stream, versus merely using or calling out to it–so it's incredibly seamless because your code is actually within and running it at the same time."
Why do you like building systems with Akka?
"I've been using Akka for about eight years building large-scale, real-time platforms–everything from cloud automation and cybersecurity to data analytics and machine learning platforms. I found it extremely applicable to all of those because it simplifies building highly scalable and fault-tolerant, self-healing systems, and it does this very easily. The mechanisms are all baked in to do that, and you really just need to customize it to the behaviors and the partitioning, routing, and hierarchy that you want.
On a lower level, I'd say what's nice about Akka is it encapsulates the state and message-passing, which is a lot easier to reason about in terms of design compared to, for example, hand coding traditional concurrency primitives with mutex and locks, comparative data structures, and things like that. With Akka, you have to think about that much less. You get out-of-the-box things like state isolation, reasoning about the behavior and units of computation, and you get free location transparency, event sourcing for immutable event logs with Akka Persistence, and more. These are different tools just on the base level of using Akka.
Then, on a higher level, you get into the whole Akka Cluster ecosystem. This is primarily what I think most people use Akka for, and it includes many tools that make everything easier to work on a highly scalable, distributed compute cluster. Particularly when you get into large-scale deployments in production, which you can seamlessly integrate with Akka Management.
It makes it all very easy in terms of clustering your nodes, accessing node awareness and different state of the nodes, leveraging cluster sharding, CRDTs with distributed data, and seamlessly integrating all of this with highly configurable types of streaming with integrated back-pressure. It's an integrated suite that works very nicely in terms of your design, and really from the programmer point of view. I like that I can design and work with these systems and think about these nodes as live entities that I'm deploying and making them more intelligent with Akka. It lets you create more than just a set of programs or applications. It's a whole new level that nothing else really offers in the JVM ecosystem."
Why is Akka the ideal match for cloud native applications?
"Really, this is about enabling stateful behaviors as if they were stateless, with a lot less infrastructure. There are relatively fewer cases where nodes can be purely independent with no need for any kind of central coordination.
What I like is that Akka Cluster makes it easy to have peer-to-peer nodes in those situations versus going through some sort of central point such as a data or key value store, or some sort of messaging infrastructure. I can manage my distributed state and communication within the application layer through Akka and Akka Cluster.
I think what sets Akka apart from traditional event-streaming platforms is that your code actually runs in the event stream as the event stream versus merely using or calling out to it. It's actually within and running it at the same time, so it's incredibly seamless. I don't think that I've found that with anything else. Having message passing wrapping your logic and the behavior just makes it much more natural to use."
Inspired by what Helena has to say about Akka? Why not sit down with us to see Akka in action? We'll demo what Akka looks like in production as part of a subscription to Lightbend Platform, including observability, telemetry, and system health monitoring as well as Akka resilience and persistence enhancements.