Akka workshoppers hard at work!

In we have experience in running distributed systems, and we often rely on asynchronous communication between our applications. Apache Kafka is the work-horse on the house, and it’s doing an excellent job for us.

But this doesn’t mean that we shouldn’t learn new things - or look at other solutions.

Akka is an implementation of the Actor Model - a concept of concurrent processing first published in 1973. The Actor Model is all about two ideas: Actors and Messages.

Actors sending messages

A number of Actors communicate to each other using messages. An Actor will process its received messages sequentially, and send messages to other actors asynchronously. It can also keep state, perform side-effects and supervise other actors. This small hand-full of operations makes the Actor Model easy to reason about and within one Actor we need not worry about the complexity of concurrency - one message is processed after another.

The power of the Actor Model comes from combining (often specialized) Actors in a supervised hierarchy. Concurrency and scalability comes naturally as the sending of messages between them are asynchronous. Reliability and uptime comes from a let-it-crash philosophy and supervision done through special Supervisor-Actors.

Arild wrapping heads around the async monad!

The workshop was a hands-on with a few slides between the exercises. You can do the tasks yourself by cloning and checking out the master-branch (for java) or the kotlin-branch.

Slides Resources

Tags: akka jvm workshop actor model java kotlin