As a complete microservices platform, Lagom assembles a collection of technologies and adds value on top of them.
Some of these libraries and tools were developed at Lightbend, others are third-party and open-source.
Lagom makes heavy use of immutable values, for example to represent commands, events, and states. We recommend using the third-party Immutables library to define immutable objects in Java.
In this manual, see Immutable Objects for more details.
Lagom services that persist data are encouraged, but not required, to use an event-sourced architecture. In this manual, see Event Sourcing and CQRS for a high-level explanation of what event sourcing is and why it is valuable and Persistent Entity for an introduction to Lagom’s implementation of event sourcing.
The first version of Lagom provides a Java API for writing microservices. Before long, a subsequent version will add a Scala API.
Most of Lagom is implemented in Scala. (This is an implementation detail that doesn’t normally concern Java programmers using Lagom APIs.)
Lagom’s recommended serialization format is JSON. The default engine used for JSON serialization and deserialization is Jackson.
Other serialization formats are also supported.
By default, Lagom services needing to persist data use Cassandra as database. For convenience, the development environment embeds a Cassandra server. In this manual, Cassandra Server describes Lagom’s Cassandra support further.
Lagom services are also free to use an existing Cassandra database, or another database solution entirely.
Lagom is implemented on top of Play Framework, Lightbend’s web framework. This is an implementation detail that will not directly concern simple microservices. More advanced users may wish to use some Play APIs directly.
Play is in turn built on the popular, standard netty network transport library.
If you have an existing Play Framework application that you want to add microservices to, we provide support both in sbt and Maven to help you.
Like Play, Lagom uses Guice for dependency injection.
Lagom Persistence, Publish-Subscribe, and Cluster are implemented on top of Akka, Lightbend’s toolkit for building concurrent, distributed, and resilient message-driven applications. This is an implementation detail that will not directly concern simple microservices. More advanced users may wish to use some Akka APIs directly.
Communication with browser-based clients is via WebSockets.
If you want to scale your microservices out across multiple servers, Lagom provides clustering via Akka Cluster.
Customers of Lightbend’s Reactive Platform can additionally use Lightbend ConductR and Akka’s Split Brain Resolver for deployment and cluster management and Lightbend Monitoring for monitoring production systems.
See Cluster in this manual for more details.