We—the Akka committers—are pleased to be able to announce the availability of Akka 2.3.0-RC1 (FIRST RELEASE CANDIDATE). This is what we intend to ship as 2.3.0 final unless issues are found, so please test it thoroughly and report back. Failures are important to hear about, but praise also does not hurt :-)
The key features of this major release are:
- Akka Persistence
- Actor and FSM with support for Java 8 lambda syntax
- Allowing Cluster nodes to come back from the UNREACHABLE state
When migrating an existing project from Akka 2.2.x please have a look at the migration guide.
The most exciting new feature is an experimental preview of Akka Persistence, developed by Martin Krasser in collaboration with the Akka team. It allows stateful actors to persist their internal state so that it can be recovered when an actor is started, restarted after a JVM crash or by a supervisor, or migrated in a cluster. The key concept behind Akka Persistence is that instead of storing an actor’s state you persist the changes that are applied to it. These changes are immutable facts that are appended to a journal, which allows for very high transaction rates and efficient replication. Stateful actors are recovered by replaying stored changes, rebuilding the actors’ internal state. Akka Persistence also supports event sourcing and provides point-to-point communication channels with at-least-once message delivery semantics.
Other Notable Features
- Actor and FSM with idiomatic Java 8 lambda support, allowing the formulation of these using a syntax which is close to Scala’s pattern matching and finally making the Finite State Machine DSL usable from Java.
- Detection of when cluster nodes become reachable again after having been unreachable, allowing the cluster to heal again. This makes the cluster more resilient to transient network failures and long garbage collection pauses.
- Routers have been cleaned up and enhanced. The routing logic has been extracted to be usable within normal actors as well. Some usability problems have been solved, such as properly rejecting invalid configuration combinations. Routees can be dynamically added and removed by sending special management messages to the router.
- Samples packaged as Typesafe Activator templates, public availability when the final release is published.
- Sharding of actors in a cluster. The typical use case for this feature is when you have many stateful actors that together consume more resources (e.g. memory) than fit on one machine. You need to distribute them across several nodes in the cluster and you want to be able to interact with them using their logical identifier, but without having to care about their physical location in the cluster, which might also change over time. It could for example be actors representing Aggregate Roots in Domain-Driven Design terminology.
- Aggregator pattern, contributed by Akara Sucharitakul.
- The application can specify custom logging Mapped Diagnostic Context (MDC) values, contributed by Gaston Tonietti.
- Possibility to pass in external execution context to actor system, contributed by Dario Rexin.
- ReliableProxy enhanced with reconnection when tunnel goes away, contributed by Eric Pederson.
- ActorSelection was made faster and not blocked by intermediate actors performing long-running tasks.
- Allow outgoing connection to a previously failed and now restarted actor system with same host and port without having to wait for the quarantine period to elapse.
- Allow actor selections in untrusted mode, restricted using a white-list.
- Fixed actor creation size and speed regression.
- Automatic removal of cluster nodes after a configured time period of unreachability (replaces the previously immediate “auto-down” feature to allow some time for nodes to come back).
- Several scalability improvements of clustering and remoting.
Akka Persistence Details
The “akka-persistence” module is published under the name “akka-persistence-experimental” to emphasize that its status is not yet final. This denomination is not due to sub-par standard of the module; the persistence support has been tested thoroughly and it works as documented. The reason for the “experimental” tag is that this rather important module is now presented to the general public for the first time, and although we have received valuable feedback from early adopters we anticipate possible API changes in order to meet all of your requirements. Work is continuing on Akka’s persistence support, and we will formally declare it officially supported and stable with the next major release—Akka 2.4. Please help us make it the best possible solution by continuing to give feedback on the mailing list and telling us what can be improved.
Key Akka Persistence features include:
- Processors: A processor is a persistent, stateful actor. Messages sent to a processor are written to a journal before its receive method is called. When a processor is started or restarted, journaled messages are replayed to that processor, so that it can recover internal state from these messages.
- Views: A view is a persistent, stateful actor that receives journaled messages that have been written by another processor. A view itself does not journal new messages, instead, it updates internal state only from a processor’s replicated message stream.
- Channels: Channels are used by processors and views to communicate with other actors. They prevent that replayed messages are redundantly delivered to these actors and provide at-least-once message delivery semantics.
- Journals: A journal stores messages that are sent to a processor. An application can control which messages are journaled and which are received by the processor without being journaled. The storage backend of a journal is pluggable. The default journal storage plugin writes to the local filesystem (using LevelDB), replicated journals are available as Community plugins.
- Snapshot stores: A snapshot store persists snapshots of a processor’s or a view’s internal state. Snapshots are used for optimizing recovery times. The storage backend of a snapshot store is pluggable. The default snapshot storage plugin writes to the local filesystem.
- Event sourcing. Based on the building blocks described above, Akka persistence provides abstractions for the development of event sourced applications.
This article gives a brief introduction to Akka Persistence.
Additional Release Details
Known issues that will be solved before the final release:
- OSGi integration with class loader that finds reference.conf files in all bundles.
- Scaladoc diagrams
- Some documentation improvements
The artifacts comprising this release have been published to https://repo1.maven.org/maven2/ and also to Maven Central. In addition, we adopted the sbt standard of encoding the Scala binary version in the artifact name, i.e. the core actor package’s artifactId is “akka-actor_2.10”.
Akka is released under the Apache V2 license.
v2.3.0-RC1 compared to Akka v2.2.3:
- 159 tickets closed, see milestones 2.3-M1, 2.3-M2 and 2.3.0-RC1 in Assembla
- 1077 files changed, 82575 insertions(+), 34225 deletions(-)
- … and a total of 36 committers!
commits added removed 123 31426 17080 Patrik Nordwall 32 30946 5850 Björn Antonsson 30 3101 9662 Endre Sándor Varga 22 21483 6060 Martin Krasser 15 220 321 Roland Kuhn 10 237 222 Viktor Klang 7 119 27 Johannes Rudolph 3 302 119 Mathias 3 135 75 Marcus Ljungblad 3 184 34 Dario Rexin 2 2 2 Levi Notik 1 1 1 MariusSeritan 1 49 21 Josh Suereth 1 6 0 Mark "Justin" Waks 1 644 17 Gaston M. Tonietti 1 16 11 Taylor Leese 1 35 23 rob.david 1 1 1 oakwhiz 1 0 5 Nilanjan Raychaudhuri 1 1 1 Francois Armand 1 13 0 Michael Pollmeier 1 1 1 Ben McCann 1 691 0 Akara Sucharitakul 1 2 2 dave 1 0 50 Jonas Boner 1 1 1 Luc Perkins 1 9 1 Gaetan Hervouet 1 1 1 Joa Ebert 1 8 8 dario.rexin 1 2 2 Eugene Platonov 1 477 97 Eric Pederson 1 2 1 Andrey Stepachev 1 4 4 Sander Mak 1 39 42 Gustav Åkesson 1 3 1 jcranky 1 114 6 Ian Wormsbecker 1 1 1 Jonas Bonér