Blog Posts

One anti-pattern I’ve observed in networked Akka applications is a tendency to forget that it is, well, networked and to treat the network as a friendly place. How does that look like? Well, consider the following piece of code: [crayon-5955079b9a12b050917263/] Akka’s default message sending mechanism is the fire-and-forget tell method. And that works great – until it doesn’t. See, tell ... Read More

The post Akka anti-patterns: trusting the network appeared first on manuel bernhardt.

Whilst I have always successfully discouraged my clients from using Akka Remoting in their application, I often get questions regarding remoting while talking about anti-patterns at conferences and user groups. Don’t get me wrong. I love Akka remoting. Especially the new Aeron-based Artery remoting version that is based on UDP rather than TCP. Whilst it maintains the same delivery guarantees, ... Read More

The post Akka anti-patterns: using remoting appeared first on manuel bernhardt.

Lagom is a framework for building reactive microservices in Scala or Java with an emphasis on developer productivity. I’ve had a chance to work with it for some time and would like to share my impressions about it. This is going to take a bit longer than just one post, so you’re reading part one of a 3-part series: Part ... Read More

The post Tour de Lagom Part 1: Lagom and microservices appeared first on manuel bernhardt.

Akka Streams is a powerful implementation on top of the Reactive Streams SPI for non-blocking asynchronous communication with back-pressure on the JVM. This post is not about explaining what this means, nor what Akka Streams does. The purpose of this post is to explain what on earth the NotUsed type in type signatures of Akka Streams is all about which ... Read More

The post Akka Streams – What is NotUsed all about appeared first on manuel bernhardt.

Tags: #akka #it

Akka anti-patterns: blocking
15.05.2017 07:59 by Manuel

This is probably one of the most frequent (and dangerous) anti-patterns when it comes to working with Akka. Let’s look at an adequate description of the mindset you must be in in order to use it: So maybe you didn’t actually want to see the world burn. Maybe you thought that this one time it was okay to call blocking ... Read More

The post Akka anti-patterns: blocking appeared first on manuel bernhardt.

Choosing Akka as a tool is often – if not always – driven by the need for good performance. Surely, the actor model itself is appealing as a means for organizing and reasoning about code, but this isn’t in itself a good reason enough to use the Akka toolkit. If all you are concerned about is a nice way to ... Read More

The post Akka anti-patterns: being out of touch with the hardware appeared first on manuel bernhardt.

Update: removed rogue toString call in the second code example, since it was unnecessary (and harmful). Debugging actor systems is no small feat, even when there is IDE support for it. In fact, debugging any asynchronous system for that matter is a rather complicated task. Which is why, especially during development, it is not entirely uncommon to rely on DEBUG ... Read More

The post Akka anti-patterns: logging (the wrong way) appeared first on manuel bernhardt.

It is quite extraordinary what is possible nowadays with a group of interested developers and powerful tools such as Scala and Akka. Three months ago we had our first Akka Workshop here at the Vienna Scala User Group (VSUG), in … Continue reading
Here are 3 learnings from last weeks Akka coding session, in which all participants connected their Actors in order to participate in a Prisoner’s Dilemma competition. 1. Prepare Your Networking Infrastructure for Akka Akka needs TCP connections in order to … Continue reading
More than 20 people with no prior Akka experience, 10 minutes preparation talk, one idea: getting everyone to write Actors participating in a realtime competition to beat others in the game of Prisoner’s Dilemma. Sounds challenging? Yes, it is. Did … Continue reading