Chris reviews how the Akka toolkit helps you build reactive, distributed, concurrent, resilient, and message-driven applications.
- [Narrator] In this video, we're gonna talk about the Akka library. Akka is a set of open-source libraries for building reactive, highly concurrent, distributed, resilient, and message-driven applications. As you may recall from earlier videos, system resilience allows your system to cope with component failure, lost messages, and network latency. Akka will help your systems become more resilient.
Akka makes extensive use of the Actor Model. Akka's use of the Actor Model, provides a level of abstraction that makes it easier to write correct concurrent, parallel, and distributed systems. So why should you use Akka? It will help you build simpler concurrent and distributed systems. Akka actors and streams will let you build systems that scale up using the resources of a server more efficiently.
It will also help you build a distributed system that will let you scale out using multiple servers. Akka is resilient by design. Systems built with Akka self-heal, and stay responsive in the face of failures. Akka is generally regarded as a high throughput, high performance library. According to Akka's documentation, you can scale up to 50 million messages a second on a single machine.
Akka also claims to have a very small memory footprint, allowing you to have up to 2.5 million actors per gigabyte of heap memory. I encourage you to read more about these benchmarks to understand the context around these performance tests. You could see the full details of the benchmarks at the URL below. Akka could also help your system to be more elastic. Akka helps you build distributed systems, without a single point of failure.
You can also leverage load balancing and adaptive routing across nodes to make your system even more elastic. Some other techniques you can use are event sourcing, CQRS, and cluster sharding. You could also design your data to be distributed with eventual consistency. This can be achieved using conflict-free-replicated-data-types. Akka lets you work with reactive streaming data.
Streams in Akka are asynchronous, non-blocking and allow you to process a stream with back pressure so that you don't get overwhelmed. With Akka, you also get a fully async, streaming HTTP server. Other things you get with Akka, are multi-threaded behavior without the use of low-level concurrency constructs such as atomics or locks. You also get transparent remote communication between systems and their components.
Akka is also great to use on a clustered, high-availability, architecture that is elastic and scales in, or out, based on demand.
- Reactive programming concepts and techniques
- Functional programming concepts and techniques
- Overview of popular reactive frameworks
- Building an RxJava application
- Building an Akka application
- Unit testing with Akka and RxJava