IT

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

A quick tour of build tools in Scala

Published on 19 April 2018

Update 20.04.2018: added Polyglot Maven Scala has a rich ecosystem and active community producing a lot of useful libraries. So much so that, sometimes it is not easy as a newcomer to decide which library to pick for a given task (this is the case for example when it comes to database access and JSON – 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 – Cluster Sharding

Published on 26 February 2018

In Tour of Akka Cluster – Eventual consistency, persistent actors and message delivery semantics we started to look into making the reactive payment processor resilient to node crashes by exploring Akka Persistence, a mechansim that provides durability guarantees for actor state. We also briefly mentioned Akka Cluster Sharding which offers a way to automatically distribute – 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