RSSAmplifier

Blog

Manuel Bernhardt

Recent content on Manuel Bernhardt

manuel.bernhardt.ioRSS feed ↗203 posts

Latest posts

Macbook Pro Insomnia

Update (01.08.2025): fixed broken link, typo, clarified problematic behaviour For a number of years now I have a MacBook Pro Silicon M1 Max. It worked beautifully. Then, seemingly out of nowhere, I started noticing that the battery drained over night when I left the notebook somewhere, not connected to power. This got worse and worse, up until the point that I’ve had enough of it and I…

200 dives and counting

200th dive I started diving when I was 6 years old. Although I now live for a very long time in land-locked Austria, I still enjoy diving when I get the chance. The above picture was taken on Curaçao last October, where I went diving with my father. When the world goes entirely crazy my plan is to relocate somewhere warm and work as a scuba dive instructor.

Cloud Run Job with arguments

Cloud Run Jobs allows to run containers as jobs, i.e. as short-lived tasks that spin up a container every time that they’re invoked. As with every container you can use environment variables to pass context. But what if we want to pass arguments to the container? In this case, the GCP API specifies containerOverrides . When using terraform, we can pass those with the…

On Azure

I’m working with a client condemned to graced with the privilege of using the Azure Cloud platform. Whilst I have years of experience working with AWS and GCP, my last exposure to Azure goes back to 2017. Memories from that time before Corona are faint, the world was a different place back then. But some things do not change. On Managed Identities …without having to manage any…

Migrating from Kubernetes to Google Cloud Run with terraform

Kubernetes has its advantages when you’re big enough and require the flexibility it offers. But when all you’re after is running services and you don’t need stateful sets, Google Cloud Run can be a good alternative (provided you’re using Google Cloud Platform). This article provides a few pointers to migrate Kubernetes deployments to Google Cloud Run. Migrating YAML…

Fearless concurrency with Rust, cats, and a few Raspberry PIs

Somehow I’m never satisfied when a program only runs on one computer. The reassuring feeling of connectedness, the thrill of discovering who else is there on the network, the fear of network instability and the insanity of trying to establish a coherent view of the world on multiple machines are both a source of joy and despair that keep me hooked. But I digress… In the previous…

Building a cat litter box reminder with Rust

I continued working on a side-project I built a year ago with Rust , and it is now at a point at which I can write something about it. When you own cats, you also own a litter box for said cats which needs to be emptied regularly (at least once a day for two adult cats). Failing this, the cats will give you a look which, in human language, means as much as “I will murder you in your…

On pinning and isolating CPU cores

This year I have been involved in running performance benchmarks of Aeron over at Adaptive on two major cloud providers. I learned quite a few things about the arcane arts science craft of running performance benchmarks. When benchmarking a piece of software, you really want to get the best performance out of it, which is to say that you also want to run it under the best conditions in order to…

Photography

I’m using a Fuji X-S10 camera, mostly with the Fujinon XF 10-24mmF4 and the Fujinon XF 35mmF1.4 lenses. 55mm f/28/5 1/340sec ISO " > 18mm f/16/5 1/100sec ISO " > 107/5mm f/4 1/500sec ISO " > 10mm f/28/5 1/750sec ISO " > 87/5mm f/28/5 62244/93366001sec ISO " > 24mm f/28/5 1/750sec ISO " > 3184928/131067mm f/4 29548/25115801sec ISO " > 24mm f/28/5 11533/21912701sec ISO " > 3630556/131067mm…

Rust Development for the Raspberry Pi on Apple Silicon

Update (18.02.2023): Updated the article to reflect the usage of VSCode remote development instead of JetBrains Gateway A few weeks ago I started building a Rust project for the Raspberry PI using my brand new MacBook Pro with an M1 chip (the old MacBook Pro from late 2013 still works but it simply is too slow for the work I’m doing these days). Shiny new MacBook Pro complete with…

Resume

Training course delivery I’m a certified Lightbend Academy trainer and have delivered a number of courses on Akka and Scala. 2020: Company (financial products and services): Lightbend Akka for Java - Professional 2020: Deutsche Bahn Systel (mobility): Lightbend Akka for Java - Expert 2020: Company (digital media measurement and analytics): Lightbend Scala Language - Professional 2020:…

Switching to Hugo after 17 years of WordPress

In the fall of 2005, I installed WordPress on the free hosting space provided by my ISP in France (fittingly called Free ). I had very little experience with PHP but enough so to get the site up and running. Initially called Lost in translation (after the eponymous movie starring Bill Murray and Scarlett Johansson) and I was writing about… well, I frankly don’t remember. However it…

Programming Languages

Programming languages I have dabbled with, in approximate order of first encounter: Sinclair ZX81 basic QuickBasic logo turbo basic turbo pascal assembly html c java sql matlab php perl javascript python action script scala groovy typescript go swift kotlin rust I always planned on looking closer at a LISP (such as Clojure) but so far haven’t found the time to play with one. In general, I…

Hey

I started using Hey last July as it seemed like a good way to get less noise via e-mail, for my personal e-mails. After about a year of using it, here’s what I can say about it. What works for me it is easy to just turn off noise by screening out incoming e-mail adresses for some things, it is fast What does not work for me when I click on an e-mail to read it, it is marked as read. Then, it…

Tour of Temporal: Performance

In the last part of this series , we looked into the fundamentals of the Temporal workflow engine and how it compares to actor toolkits such as Akka . As I wrote in the previous part, my personal experience with workflows has led me to associate anything with the word “worfklow” in it to “a slow process” (taking minutes to complete). In order to clear that idea from my mind…

Akka Raspberry PI demos

Here are a few demonstrations of how Akka Cluster works internally using a Raspberry PI cluster stack.

Tour of Temporal: Welcome to the Workflow

I’ve been exposed to workflows early on in my career, at first in enterprise environments where advanced GUIs were used to model highly complex business workflows whose execution would invariable lead to hours of debugging through mountains of log files via a remote desktop connection to the server running the proprietary workflow execution engine and later in research projects which would…

Smartphone Detox

“Insanity is doing the same thing over and over again and expecting different results.” – Someone ( not Einstein ) Smartphones are addictive and highly distracting. Their mere presence reduces cognitive ability . I tried getting rid of mine - or at least of its intensive usage - many times over and have failed. Here’s my attempt at another shot, inspired by this article .…

Disciplines for getting out of the stream

“Life is what happens to you while you’re busy making other plans” – John Lennon But what if you’re not making plans. Or if all the plans you are making are more reactions to address short-term goals, needs or issues, rather than stepping back and looking at the general direction you’re headed? I think this easily happens to most of us. When caught up in daily…

When not to save money

Most people like to save money. But in some cases, saving money is counter-productive or will cost you more money, or so much time that you had wished spending a little more money. Buying low quality items is one of these situations. The old saying too poor to buy cheap captures to essence of it: low quality ends up costing more on the long run than saving some money on the short term.

Three key findings from ten years of home-office

It’s been nearly ten years that I have worked mainly from home (or more accurately, homes , as we moved around a bit). As it turns out, many people now work from home, less so by choice than by dystopian scenario C circumstance. Whilst I’m sure that there are already hundreds of articles on the topic I thought I’d write a bit about my experience and especially about some aspects…

10000 nodes and beyond with Akka Cluster and Rapid

Update: there’s a podcast episode about this T he year is 2021. As the world is still deeply affected by the COVID-19 pandemic, the United Nations have decided that in order to prevent the same scenario of ever happening again, there should be a worldwide, real-time contact-tracing system in place capable of tracking every human being on the planet. Everyone is now equipped with a small,…

Akka Consulting

If you are looking for a consultant to help you with the Akka Toolkit , you have come to the right place! Over the past decade I have consulted with dozens of clients on the topic distributed and reactive systems using technologies such as Akka, Akka Cluster, Akka Streams as well as related technologies such as Kafka, Kubernetes and Cassandra to name but a few. A physical Akka Cluster used in Akka…

Akka Cluster on Raspberry PI

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…

Akka anti-patterns overview

This is an overview of Akka anti-pattern articles. You can think of these anti-patterns as the opposite of Akka best practices – that is, things you should not be doing when using Akka. Here is also a talk about 8 very frequent anti-patterns out there: Basics Shared mutable state Blocking Flat actor hierarchies / Mixing business logic and failure handling Race conditions Stateless actors Too many…

Tour of Akka Typed: Cluster Singleton and Routers

In part 5 of this series , we started to scale the application from a local one to a clustered one by introducing Cluster Sharding. In this article, we will continue our effort to scale the payment processor out and make it resilient through the use of Cluster Singletons and Cluster-Aware Routers. Before we get started, here’s a quick reminder of what we’ve seen so far: in the first part we had a…

Tour of Akka Typed: Cluster Sharding

Update 21/11/2019: Fixed comment about shardId extraction in relation to ShardingEnvelope Welcome to the fifth part of the Akka Typed series! In this part, we’ll leave the safe harbor of a single JVM and sail into the seas of distributed systems by exploring a key features of Akka Cluster with the typed API: Cluster Sharding. If you want to get a more in-depth introduction to Akka Cluster, I…

One step closer: exploiting locality in Akka Cluster based systems

When it comes to the latency of processing a request in a distributed system, everyone knows (or should know ) that doing things over the network is the most expensive thing you can do (alongside with disk reads): The round trip time in a datacenter is about 5000 times longer than a main memory reference Modern architectures have recognized this and will favor keeping data in memory, avoiding the…

Articles

This is an overview of some of what I’ve written over the years. Featured 10000 nodes and beyond with Akka Cluster and Rapid On pinning and and isolating CPU cores Akka Raspberry PI demos A new adaptive accrual failure detector for Akka SRE / DevOps On Azure Rust Fearless concurrency with Rust, cats, and a few Raspberry PIs Building a cat litter box reminder with Rust Rust development for th…

Tour of Akka Typed: Event Sourcing

Welcome to the fourth part of the Akka Typed series. In the first part we had a look at the the raison d’être of Akka Typed and what advantages it has over the classic, untyped API. In the second part we introduced the concepts of message adapters, the ask pattern and actor discovery. In the third part, we covered one of the core concepts of Actor systems: supervision and failure recovery . In…

Tour of Akka Typed: supervision and signals

Update 18.10.2019: fixed wrong syntax for handling multiple exceptions, clarifying a few points Welcome to the third part of the Akka Typed series. In the first part we had a look at the the raison d’être of Akka Typed and what advantages it has over the classic, untyped API. In the second part we introduced the concepts of message adapters, the ask pattern and actor discovery. In this part…

Tour of Akka Typed: Message Adapters, Ask Pattern and Actor Discovery

In the previous article of this series we’ve explored the basics of the Akka Typed API: why it was created and what are its benefits in comparison to the classic Actor API, how to build typed actor systems via protocols and behaviors and how to create typed actors. In this series we’re going to go further down the route of building typed actor systems by looking at fundamental concepts…

Tour of Akka Typed: Protocols and Behaviors

Update 18.08.2019: corrected actor hierarchy and default supervision strategy Ukrainian translation / Chinese translation In this series we are going to explore Akka Typed , the new Akka Actor API that brings significant advantage over the classic one. Akka Typed is ready for production since April and although the API is still marked as may change I think it is a good time to look into it and to…

Optimizing CI build times for Scala projects

CI / CD pipelines that run for each new and merged pull-request (or even for each commit on a branch) are today’s de-facto standard when it comes to developing software. Running the complete test suite automatically ensures that regressions are rapidly identified and do not make it into production. As applications grow and their test suites grow (well, ideally, of course), build times tend…

Why I’m still using a MacBook Pro Late 2013 in 2019

Update: it is now June 2021 and I’m still using the MacBook Pro Late 2013 Update: it is now February 2022 and I’m still using the MacBook Pro Late 2013 after having changed the thermal paste for the CPU and GPU I’ve started using Apple computers in 2008. Of all the Apple computers - and other computers - I’ve owned, the MacBook Pro Late 2013 is the one I’ve been able…

Raspberry PI Akka Cluster LED strips

Ever since Eric Loots from Lightbend first showed me the Raspberry-PI based Akka Cluster with special LED stripes, I’ve wanted (at least) one of them. The Akka PI Cluster at Scala Days 2018 This is a 5 node cluster with special LED stripes setup in such a way that the LED colour and status (on, off, blinking, etc.) show in which state each node is. It is an excellent way to teach Akka…

2018: year in review

I had intended to write a yearly review for a few years now but have not managed so far - 2018 is going to be the year that I finally get down to it. Looking back at the year is an interesting exercise and if I manage to keep this up for a few years (fingers crossed) it might provide a few interesting insights — and if not, it will have been fun anyway.

Akka anti-patterns: too many actors

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 very frequent anti-pattern. It is to be found in…

Tour of Akka Cluster

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

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, which Mark Reinhold called a…

Akka anti-patterns: stateless actors

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 of a safe space in which things are executed…

A quick tour of build tools in Scala

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 handling ). In this article we are going to cover another domain in which there is an increasing…

60-Minute Strategy Call

Do you want to make sure you’re headed the right direction before investing a considerable amount of time and money? Do you need a quick look at your planned architecture? Are you unsure as to the next steps to take? I can help you with a focused strategy call during which we’ll work out solutions for your problems. [testimonials category="strategy-testimonials" class="owl-one"] What’s…

Services

Expert services to guide you towards a reactive system architecture My services are available as low-risk, fixed-price packages. If you didn’t find a package to meet your needs, don’t hesitate to get in touch with me to discuss a custom engagement. I offer all of these services in english, german and french. 60-Minute Strategy Call Do you want to make sure you're headed the right…

Tour of Akka Cluster – Testing with the multi-node-testkit and a handful Raspberry PIs

In the previous parts of this article series, we have looked at various functionality of Akka Cluster: distributed data , persistence, message delivery semantics and cluster sharding . We are far from done with exploring Akka Cluster features, but today it is time to look at one feature that is extremely useful when it comes to building production-quality systems based on Akka Cluster: the test…

Akka anti-patterns: overusing ActorSelection

Akka’s ActorSelection makes it possible to look up actors by logical path in the hierarchy: 1 val selection : ActorSelection = context . actorSelection ( '../processor/storage' ) This selection can then be used like ActorRef in order to send messages to it using the tell or ask patterns: 1 2 3 selection ! Storage . Store ( 'important words' ) val allWords : Future [ Seq [ String ]] =…

Lightbend Akka Streams for Scala – Professional

Want to help your team to get up to speed with Akka Streams, enabling them to build powerful streaming data applictions? I have been working intensively with Akka since 2011 and am offering remote and in-house training for teams. Summary This one day course introduces experienced Akka developers to the Akka Streams API. Akka Streams enables the consumption of streaming data, in a fully…

Tour of Akka Cluster – Cluster Sharding

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 actors of the same type…

Tour of Akka Cluster – Eventual consistency, persistent actors, message delivery semantics

In Tour of Akka Cluster - Akka Distributed Data we looked into building a reactive payment processing system using Akka Distributed Data as a means to provide master-master replication to the order storage component. We did not, however, ensure in any way of form that the system as a whole could withstand individual node crashes. In this article, we will explore options for making the Reactive…

Tour of Akka Cluster – Akka Distributed Data

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 of life. One…