Cancelling work in flight by Derek Wyatt
Derek posted an excellent post about Cancelling work in flight when using Akka, by introducing a Work Awaiter and Work Scheduler instead of just a Worker like many implementations do.
Akka @ Gitter
Dear hakkers,
due to great interest and seeing how it works very well for other communities, Akka is joining the gitter fold. We have two public chat rooms currently configured:
- akka/akka is the user chat where all questions and ideas about using Akka can be discussed between anyone who’s interested. While we don’t patrol the channel 24/7 we do expect that people apply common sense as expressed in the rules.
- akka/dev is the developer channel where only implementation work is discussed—this is where the core team and the contributors coordinate work on pull requests and issues. Similar rules apply here as well.
The akka/dev channel replaces the akka-dev google group which is now closed for posting (but the archives remain).
Happy hakking!
Akka 2.4-M1 Announcement
Dear hAkkers,
we—the Akka committers—proudly present the first development milestone for Akka 2.4. Since the release of Akka 2.3.0 (already 14.5 months ago) much has happened, in particular around Streams & HTTP. It may therefore surprise you that these additions to the Akka toolkit are not yet part of the 2.4 development branch, but if you read on for a little while the pieces of the puzzle will fall into place. Besides a plethora of small improvements the main changes relative to the 2.3.x series are:
- we dropped support for Java 6 & 7 as announced in the last roadmap update, requiring now Java 8 or later
- we dropped support for Scala 2.10, kept 2.11 and added 2.12 (which is at milestone 1 currently as well); this is in keeping with our policy to support the Scala version that is “current” when the first milestone comes out plus any later version that is published during this series’ lifetime
- we added the experimental Akka Typed module previously codenamed Project Gålbma, a new way of formulating Actor interactions with full type-system support
- we promoted the ClusterSingleton, ClusterClient, DistributedPubSub and ClusterSharding patterns to fully supported Cluster tools
- ClusterSharding also learnt a few new tricks (asynchronous shard allocation, reviving entries after migration [thanks to Dominic Black], and more flexible use of roles [thanks to Richard Marscher])
- Akka Persistence can now use multiple different Journals within one ActorSystem (thanks to Andrei Pozolotin, who also split out ClusterMetrics into their own module)
- we also removed the default Journal plugin and removed the hard dependency on LevelDB (since that was not a recommended production configuration anyway)
- we added support for binding to a different host & port than what the ActorSystem advertises to its peers, a.k.a. “allow Akka to run in Docker containers”
- the SLF4J logging adapter can now apply the log filtering rules prior to sending to the EventStream, see the migration guide
- but the biggest feature is probably that Akka 2.4 will be binary backwards compatible with Akka 2.3, see the detailed description below.
Being binary compatible means that applications and libraries built on top of Akka 2.3.x continue to work with Akka 2.4.x without recompilation (subject to the conditions below), which implies that Akka Streams & HTTP as well as the upcoming Play Framework 2.4 can be combined with Akka 2.4.
Akka 2.4 Roadmap
What remains to be done before we can release 2.4.0-RC1 is to
- complete the Java API and the documentation for Akka Typed
- finalize Akka Persistence on the Write Side (i.e. PersistentActor will be non-experimental; the work on the Read Side will be deferred until Akka 2.5)
- incorporate Streams & HTTP once ready (to become an experimental module, as usual)
- incorporate Patrik’s akka-data-replication under the new module name akka-distributed-data
We will perform this work within the next weeks, releasing further milestones when appropriate. Please do what you usually do so well: try out our latest and report back when things break, not work as advertised, feel strange, or even when you are happy :-) Especially concerning binary compatibility we will need help from the community (you!) since we cannot run all possible programs ourselves; we base our BC efforts on the MiMa plugin but that is no perfect guarantee that everything will work out of the box.
Binary Compatibility
Akka 2.4.x is backwards binary compatible with previous 2.3.x versions (exceptions listed below). This means that the new JARs are a drop-in replacement for the old one (but not the other way around) as long as your build does not enable the inliner (Scala-only restriction). It should be noted that Scala 2.11.x is is not binary compatible with Scala 2.10.x, which means that Akka’s binary compatibility property only holds between versions that were built for a given Scala version—akka-actor_2.11-2.4-M1.jar is compatible with akka-actor_2.11-2.3.11.jar but not with akka-actor_2.10-2.3.11.jar.
Binary compatibility is not maintained for the following:
- akka-testkit and akka-multi-node-testkit
- experimental modules, such as akka-persistence and akka-contrib
- features, classes, methods that were deprecated in 2.3.x and removed in 2.4.x
The dependency to Netty has been updated from version 3.8.0.Final to 3.10.3.Final. The changes in those versions might not be fully binary compatible, but we believe that it will not be a problem in practice. No changes were needed to the Akka source code for this update. Users of libraries that depend on 3.8.0.Final that break with 3.10.3.Final should be able to manually downgrade the dependency to 3.8.0.Final and Akka will still work with that version.
The dependency to Typesafe Config has been updated from 1.2.1 to 1.3.0 which should be binary compatible for the vast majority users, except for obscure edge cases as its changelog points out. This change was made in order in order to use new JDK8 specific features in the library as well as to align Akka with Play which is now also depending on 1.3.0.
When migrating a code base to 2.4 please refer to the migration guide in order to profit from some of the improvements.
General Remarks
We are extraordinarily proud of the long list of contributors to this release, looking at the commit history we find more than 100 names! We are particularly thankful to hepin1989 (a.k.a. kerr) who contributed already 19 pull requests to Akka. Other noteworthy mentions besides Andrei Pozolotin’s, Dominic Black’s and Richard Marscher’s (which are already listed above) are:
- Improve remote watching mechanism by Thibaut Robert
- Improve AtLeastOnceDelivery by Adam Warski
- Get current topics in DistributedPubSub by Ben Poserow
The complete list of closed tickets can be found in the 2.4-M1 github issues milestone.
For the full stats see the announcement on the website.
Happy hakking!
Akka has won this year’s JAX Award for most innovative open technology
An interview with Akka project team lead Dr. Roland Kuhn conducted at JAX Award ceremony.
Inside view of the work behind Akka with Dr. Roland Kuhn
Takipi posted a blog post, where Alex Zhitnitsky (@tkfxin) interviewed Akka Project Tech Lead Dr. Roland Kuhn on the Akka Streams, Akka HTTP and Akka Typed projects.
Visualizing back pressure and reactive streams with akka-streams, statsd, grafana
A blog post by @josdirksen on visualizing backpressure while processing data using akka-streams.
Akka Streams & HTTP 1.0-RC1 Announcement
Dear hAkkers,
we—the Akka committers—are exceptionally proud to present the first RELEASE CANDIDATE or Akka Streams & HTTP. While this is not the end of the journey—several features are going to be added after 1.0—the time has come to declare a (very) useful subset of the intended functionality ready for public consumption. Since the last milestone we have added the following high-level features:
- a TestKit for streams
- proper naming for all parts of a flow topology (see
.named) - add SslTls stage including support for session renegotiation
- added ActorRefSink and ActorRefSource for simple Actor integration
- data flow logging by a prepackaged combinator (see
.log) - Source and Sink for files (using FileChannel) as well as for InputStream/OutputStream
- HTTP client with connection pooling and idempotent request retry
- … and (wait for it) … Websockets :-)
In addition we fixed many small things, as usual, and we also did some last renames and reorganizations in order to offer a consistent API:
- Java functional interfaces moved to akka-actor (2.3.10, see
akka.japi.function) - improved Java compilation error messages by adding arity to method name in flow factories
- made OperationAttributes language-independent and also extensible, dispatcher and supervision properties moved to ActorOperationAttributes
- removed
.sectionin favor of.withAttributesand.via - moved FlattenStrategy into the Java/Scala DSLs
- reorganized the project structure and package hierarchy of HTTP to offer consistent and equivalent Java & Scala APIs
- relaxed method signatures to accept Graphs instead of the more specific Source/Flow/Sink types to enable free reuse of blueprints between Java & Scala
- renamed StreamTcp to Tcp and the bind method takes interface and port parameters instead of InetSocketAddress
On the State of HTTPS
While we now have all the ingredients—SslTls and HTTP are BidiFlows that can be connected—we do not yet have nice convenience APIs for using HTTP and SSL together. This will come in one of the next releases, perhaps even before 1.0.
Things that are Known Missing
The cookbook section of the streams documentation has not yet been ported to Java, but the text of the Scala version applies to both languages. More documentation will follow in general, in particularly SslTls currently only has API docs.
The akka-http-core module is still missing the Java side of the multipart model (#15674).
Working with HTTPS (client- and server-side) is not yet as easy as it will be.
Additionally not all of the directives that make up the high-level server-side API in akka-http-scala have proper counterparts in akka-http-java (#16436). We will close these gaps shortly.
General Notices
The complete list of closed tickets can be found in the streams-1.0-RC1 and http-1.0-RC1 github issues milestones.
The activator templates have also been updated:
We’d like to thank all of you for testing and for providing feedback on our progress.
Credits
commits added removed
34 5010 3277 Mathias
22 4711 256 Johannes Rudolph
21 2211 1326 Patrik Nordwall
13 2921 296 Konrad Malawski
7 2712 1506 Roland Kuhn
5 2040 365 Endre Sándor Varga
5 1622 1182 Martynas Mickevičius
1 1 1 Jun
Happy hAkking!
Akka 2.3.10 Maintenance Release
We—the Akka committers—are pleased to be able to announce the availability of Akka 2.3.10. This is the tenth maintenance release of the 2.3 branch. This release contains several important improvements:
- change default configuration to disable TCP IO connection abort workaround on windows (see more below)
- fix open-coded spinlock in DirectByteBufferPool, which could result in CPU spikes for some workloads
- remove wrong assertion in remoting, which could lead to ActorSystem termination when restarted remote ActorSystem connects after being quarantined
- fix issue in remoting that allocates new socket for each unsuccessful connection attempt to a quarantined system
- fix issue in remoting to not terminate connections if quarantine id do not match, which could result in that cluster node cannot join after restart
- fix issue in ClusterSharding, when coordinator node gracefully leaves the cluster it could save invalid information about the shard locations
- fix memory leak with watch and ask involved
- fix inconsistent cluster metrics
- fix IllegalStateException in akka.dispatch.BatchingExecutor
- fix issue in clustering to exclude unreachable observations from downed node so that leader can perform its duties independent of downed nodes
- report cause of bind and connect failures
- add support for cluster member joining again after restart without having to down and remove the old member with same hostname and port
The complete list of closed tickets can be found in the 2.3.10 github issues milestone.
For the full stats see the announcement on the website.
Akka.NET 1.0 Released!
The Akka clone for Microsoft’s Common Language Runtime (CLR) that the team around Roger Alsing and Aaron Stannard have been working on for over a year now has reached version 1.0, congratulations!
Read the announcements on the Petabridge and Typesafe blogs for more details.
Akka Cluster Load Balancing
Example producer consumer(s) application that shows how Akka routing can be used to balance the load of the nodes in an Akka Cluster. Fully described in this blog post.