Akka

This is a collection of articles I wrote over the years, presently with a strong focus on building reactive systems with Akka.

Akka anti-patterns: too many actors

Published on 6 August 2018

Update 07.08.2018: clarified optimal vs. suboptimal use cases of having many actors at runtime (it could have been misunderstood that Akka isn’t meant to build systems with many actors – it entirely is – but it is questionable whether that’s always the best approach) It occurred to me that I haven’t written yet about this – Read More

Tour of Akka Cluster

Published on 3 August 2018

Here’s an overview of the Tour of Akka Cluster article series: Tour of Akka Cluster – Akka Distributed Data Tour of Akka Cluster – Eventual consistency, persistent actors, message delivery semantics Tour of Akka Cluster – Cluster Sharding Tour of Akka Cluster – Testing with the multi-node-testkit and a handful Raspberry PIs

Akka anti-patterns: Java serialization

Published on 20 July 2018

Akka makes use of serialization when messages leave the JVM boundaries. This can happen in mainly two scenarios: sending messages over the network when using Akka Cluster (do not use Akka Remote directly) or using Akka Persistence. Now here’s the catch: the default serialization technology configured in Akka is nothing but the infamous Java serialization, – Read More

Akka anti-patterns: stateless actors

Published on 30 May 2018

Actors are object-orientation done right (as opposed to say, objects in Java): their state is not visible from the outside and they communicate via messages. There’s no way to break encapsulation because you can’t peek into an actor’s state while it is running. That’s the entire point of actors: they provide you with the illusion – Read More

Akka anti-patterns: overusing ActorSelection

Published on 20 March 2018

Akka’s ActorSelection makes it possible to look up actors by logical path in the hierarchy:

This selection can then be used like ActorRef in order to send messages to it using the tell or ask patterns:

ActorSelection is therefore quite useful and allows more flexibility when designing an actor system given that trees – Read More

Tour of Akka Cluster – Akka Distributed Data

Published on 3 January 2018

Building distributed systems is hard. Pesky things like the laws of physics get in the way of maintaining state accross geographically (and chronologically) disparate systems, and, if that weren’t already outrageous enough in itself, those systems may be subject to network failures, forcing us to think about annoying tradeoffs regarding consistency, availability and the meaning – Read More

Akka anti-patterns: naming your application components after Akka concepts

Published on 26 August 2017

So you’ve just learned Akka and are tremendously excited. It’s got dispatchers, routers, supervisors – so many shiny things to play with, and in style (I mean, come on, a dispatcher sounds a lot nicer than, say, an AbstractSingletonProxyFactoryBean). And so it happens that, perhaps even unknowingly to you (you’re busy configuring a pool router), – Read More

A new adaptive accrual failure detector for Akka

Published on 26 July 2017

Akka uses the The Φ Accrual Failure Detector for failure detection, which is to say for answering the question of whether a node is alive or not. That’s one of the harder problems of distributed systems since it is virtually impossible (from the point of view of one node) to tell the difference of a – Read More