Akka is a toolkit for building massively scalable applications. At the same time, it is lightweight enough to be deployed on Raspberry PI computers. I’m fascinated with these machines since I first saw one in real life at Devoxx Antwerp in 2010, own quite a few of them (some of which are hooked up to various appliances in my home) and use them in order to demonstrate Akka Cluster to clients or at training courses.
This page is a collection of resources (articles, videos, etc.) related to running Akka Cluster on the Raspberry PI.
Akka Cluster, Java and the Raspberry 3 Model B
This was my first go at running Akka Cluster on the Raspberry PI. It is described in depth in this article. I built this for fun as an addition to building an architecture prototype for Dimoco and used it when demonstrating the prototype (pulling LAN cables or even the power supply while simulating constant load on the SMS delivery prototype and showing that not a single SMS got lost). The demonstration must have been convincing since the technology decision was made in favor of Akka in the end even though another technology was already planned to be used.
The PI Akka Cluster project
Needless to say, I was hooked. A bit later that year, we met again at the Reactive Summit in Montréal and got the project of manufacturing the LED strips (rather than soldering them by hand) going. It’s a lot more convenient to assemble new clusters that way, by just plugging the strips in.
The underlying software to run all the demos and exercises is open-source and available on GitHub, check it out!
Using the PI Akka Cluster for teaching
One reason I was so excited about this project is that it is an extremely good teaching tool. Be it while explaining a feature of a system to a client or while giving a training course, having a physical device available makes showing and explaining things a lot easier. I know there have been efforts to reproduce the LED display as software, but it simply is no the same. You can’t get the same effect as when pulling an actual, physical network cable.
I started working on a few videos to show particular features of Akka Cluster and will keep on adding them here.
Membership State Convergence
This is a short demonstration of Akka Cluster’s membership state convergence at work. The individual nodes exchange membership information using a random gossip protocol and use a vector clock for consensus. The demonstration shows when convergence is reached, i.e. when all nodes see the latest version of the gossip.
This is a short demonstration of one of the coolest features of Akka Cluster, Cluster Sharding. It shows how shards are allocated dynamically in the cluster.
Christmas Shard Allocation Strategy
This Christmas-themed video (I made it on the 23rd of december) shows a custom shard allocation strategy in action, allocating shards in such a way that they draw a christmas tree on the LED array of the cluster.