As of a few moments ago, we released Akka.NET 1.1 - the biggest feature release we’ve done for Akka.NET since releasing 1.0 last year! We have other major Akka.NET feature releases planned for later this year, but this is the first and one of the most long-awaited ones.

Akka.Cluster is released from beta

The biggest change in this release is the first stable release of Akka.Cluster, which has been in various beta stages since August 2014. During that time it’s been used as a beta package by hundreds of users who have given the Akka.NET project large amounts of bug reports and feedback.

Since that time we’ve covered Akka.Cluster in a huge range of multi-node tests, designed to ensure the cluster behaves correctly under a variety of network conditions (including some rather hostile ones) and it’s performed well.

We’ve also replaced the underlying Helios 1.4.1 transport with a brand new Helios 2.1.1 transport, which delivers up to 5x the throughput with a tremendously lower memory footprint than the previous versions.

Release of the Multi-node TestKit, Multi-node Test Runner

One tool that has proven utterly indispensable in the development of Akka.Cluster, Akka.Remote, Akka.Cluster.Tools, and Akka.Cluster.Sharding is the Akka.Remote.TestKit package - commonly referred to as the “multi-node testkit.”

This library is an extension of the Akka.TestKit that developers use for unit testing simple actors, and it offers capabilities designed for facilitating distributed unit tests for Akka.NET ActorSystems that are using Akka.Remote, Akka.Cluster, or any of the other high availability (HA) modules.

The Akka.Remote.TestKit is designed to allow you to do the to following:

  1. Run a unit test across multiple processes simultaneously, simulating how servers or virtual machines would behave in the real-world;
  2. Offers a dead-simple Domain Specific Language (DSL) that allows you to describe a multi-node unit test from a single source file;
  3. Automates the deployment, connectivity, and management of the nodes participating in the test;
  4. Accumulates logs and events from each node into a single place;
  5. Provides inter-process synchronization mechanisms, designed to allow all of the participating nodes to synchronize in the same part of a test before moving onto subsequent stages;
  6. Provides mechanisms for looking up the addresses of each node;
  7. Includes instrumentation for introducing network partitions between nodes such as latency, half-closed connections, or fully blacking out a node; and
  8. Lastly, for applications using Akka.Cluster, we include an additional set of test helper methods that guarantee things like the “don’t proceed to next stage until there are at least 4 members in the cluster who are Up.”

We use these tools for proving that the networked capabilities of Akka.NET itself work as expected, and now they’re available for use in your own applications.

Here’s all of the NuGet packages you might be interested in if you want to take advantage of the multi-node testkit:

  • Akka.Remote.TestKit - defines all of the basic infrastructure and tooling needed to define a multi-node test;
  • Akka.MultiNodeTestRunner - the custom test runner that runs the tests. Uses XUnit2 (the Akka.Remote.TestKit requires XUnit2 and can’t be used with any other testing framework.) Use this package from the commandline to actually run your multi-node tests. You can see an example of how to do this in the build.fsx file in the Akka.NET project.
  • Akka.Cluster.TestKit - extends the Akka.Remote.TestKit to provide additional helper methods for working with clustered ActorSystems.

Heads up: there’s very little in the way of documentation on how to write a multi-node test right now other than looking at the source code of Akka.NET itself (example). We will be changing that shortly.

Akka.Streams and Akka.Persistence.Query Betas

Another major part of Akka.NET 1.1 is the introduction of Akka.Streams, a powerful library with a Domain-Specific Language (DSL) that allows you to compose Akka.NET actors and workflows into streams of events and messages.

As of 1.1 Akka.Streams is now available as a beta module on NuGet.

We highly recommend that you read the Akka.Streams Quick Start Guide for Akka.NET as a place to get started.

We will be producing some Akka.Streams videos and guides too.

A second beta module is also now available as part of Akka.NET 1.1, Akka.Persistence.Query - this module is built on top of Akka.Streams and Akka.Persistence and allows users to query ranges of information directly from their underlying Akka.Persistence stores for more powerful types of reads, aggregations, and more.

Akka.Persistence.Query is available for all SQL implementations of Akka.Persistence and will be added to our other Akka.Persistence plugins shortly thereafter.

Thanks for your support

Thanks for all of your patience and support as we worked to deliver this to you - it’s been a tremendous amount of work but we really appreciate the help of all of the bug reports, Gitter questions, StackOverflow questions, and testing that our users have done on Akka.NET and specifically, Akka.Cluster over the past two years. We couldn’t have done this without you.

Read the full Akka.NET 1.1 Release Notes here.

If you liked this post, you can share it with your followers or follow us on Twitter!
Written by Aaron Stannard on July 6, 2016

 

 

Observe and Monitor Your Akka.NET Applications with Phobos

Did you know that Phobos can automatically instrument your Akka.NET applications with OpenTelemetry?

Click here to learn more.