Announcing Akka 24.05: More Security. More Performance. More Efficiency. Watch the Webinar Replay
play-framework lagom-framework

Play 2.8 and Lagom 1.6 Released

The Play Team Reactive Web Applications, Lightbend, Inc.
The Lagom Team Reactive Event-Driven Microservices , Lightbend, Inc.

6 Questions For The Play And Lagom Teams At Lightbend

Just before the end of 2019, our engineering team made two releases nearly simulatenously: Play 2.8, and Lagom 1.6. In this short post, we sit down with members of the Play and Lagom team to ask what the major improvements are, the most significant updates, and what's coming in the future roadmap. We hope you enjoy!

Q: What are the major improvements to enjoy in Play 2.8 and Lagom 1.6?

We can summarize the most substantial improvements to Play and Lagom as follows, and we welcome you to also read more details about these releases on the project websites: What’s new in Play 2.8 and What is new in Lagom 1.6.

  • Both Play 2.8 and Lagom 1.6 are now based on the new Akka 2.6 release, and have integrated support for the new Actor APIs, a.k.a. Akka Typed.
  • Both also build on Akka’s new Jackson integration, allowing you to customize Jackson modules and features more easily, as well as taking the place of the custom Jackson serializer from previous Lagom versions.
  • Lagom has added the ability to programmatically pause and resume read-side processors and topic producers.
  • Both Play and Lagom officially support Java 11 in these releases.

Q: If you had to pick the most significant updates in these releases, what would they be?

As the Akka Team said in the announcement for Akka 2.6, Akka Typed represents a major shift in the Akka ecosystem towards type-safety and more explicit guidance with Actors. We’re happy to be able to bring this to all Play and Lagom users, as well. Both Play and Lagom include dependency injection support for Actors in Akka 2.6.

While the Lagom Persistence API is still supported and maintained, the new Akka Persistence API in Akka 2.6 is now the recommended default for persistence. This provides a more flexible API that gives you greater control over some lower-level details, while retaining the opinionated and guided approach that Lagom introduced. Akka Persistence can coexist with existing persistent entities, and the same read-side processor and topic producer APIs fully support both types of entities.

Q: What was the biggest challenge for the folks working on this release?

The Lagom Team discovered that programmatically stopping and resuming Lagom’s Read Side processors was a bit more complicated than originally assumed. This presented some challenges trying to keep the state of the projection consistent across the cluster of Lagom nodes. Thankfully, Akka’s Distributed Data module provided the perfect tool for the job.

The problem boiled down to this: once you deployed a Lagom service, all projections would eagerly start. Then, if a projection had an error, it would get stuck due to a head-of-line issue, which isn’t a big deal for most people, aside from causing a lot of noise in logs.

In specific cases, however, we found that controlling when and which projections start actually provides them the necessary control to keep a hot backup instance of a service on a separate data center that is not executing the projections, leading to data corruption and inconsistencies. So, it was a challenge to make this all work, but by borrowing some tricks from Akka, we achieved what we needed to do.

Q: What was the most significant bug fix that it feels good to have finally squashed?

In Play, we changed some things that had been bothering us, such as the final updates to remove global state, improvements to the Results APIs, and introduced a clear dependency graph for your tests when deciding between Akka HTTP and Netty server backends. 

While not a bug per se, we made some improvements to various defaults in Lagom to provide a better out-of-the-box experience. For example, java.time.* serializers now use ISO-8601, and Kafka defaults to only one max inflight request per connection to reduce the chances of duplication or reordering of messages.

Q: What other Lightbend technologies does this release influence?

As we mentioned above, this release was really about making sure the Play and Lagom are both able to take advantage of the underlying technology provided by Akka 2.6.

This means that Lightbend customers using Play and Lagom can take advantage of enhancements in Lightbend Telemetry for Akka 2.6, as well as get support for the latest Scala version (2.13) and LTS Java version (11)–as well as the earlier Scala 2.12 and Java 8 versions.

Q: What does the future roadmap look like for the next release, how can folks contribute?

We’re continuing the move toward more integration between Akka, Play, and Lagom in the future. Some of these ideas include combining the development environments for Play and Lagom, bringing Lagom’s support for Akka Cluster formation into Play, and incorporating major updates that we’re making to Akka Persistence Cassandra, Akka Persistence JDBC, and Alpakka Kafka. We’re also looking at Lightbend Telemetry support for read-side processors, a popular request from Lightbend subscribers.

This focus on integration means that we don’t have as many new features planned for Play and Lagom in the next few months, but this is a great opportunity for community members to contribute in the areas most meaningful to them. If you’re looking for ideas, try the “help wanted” or “good first issue” labels in the GitHub issues for Play and Lagom.

For Serious Enterprises…

Want to see Play and Lagom in action? Schedule a demo to see Play and Lagom in production, including observability and metrics provided by Lightbend Console and Lightbend Telemetry.



The Total Economic Impact™
Of Lightbend Akka

  • 139% ROI
  • 50% to 75% faster time-to-market
  • 20x increase in developer throughput
  • <6 months Akka pays for itself