Lightbend’s Lagom Will Run Java-Based Microservices at Scale
When it comes to the rush to microservices, Java developers may feel a bit short.
Some tools, such as Spring Boot, can help. Spring Boot adds a microservices framework on top of the enterprise Java ecosystem, making it a viable option for those building out individual microservices.
But what about building a fleet of microservices to deploy at scale? Here, a new set of issues arise.
Lightbend — formerly Typesafe — saw an opportunity to address these and other pain points developers face when creating large numbers of microservices.
“Microservices only makes sense as systems, they are collaborative in nature and it is in between the individual services that the most interesting and challenging things occur. Here we are entering the world of distributed systems, which is a very different world compared to monoliths and the individual services per se,” said Kathleen Hayes, VP of Marketing at Lightbend.
Lightbend is in the process of developing a new Java framework called Lagom, offering what it hopes is a holistic approach to microservices, regardless of a project’s scale. The company promises that developers will be able to use Lagom to decompose their Enterprise Java monolithic software into a set of scalable microservices.
Reactive, Integrated, and Asynchronous
Running hundreds or thousands of services at one time requires a scalable, elastic configuration. Hayes highlights the Reactive Manifesto as a crucial focal point for getting the most out of Lagom and other microservice frameworks. Reactive Principles follow four key points for building a stronger system architecture: They must be responsive, resilient, elastic, and message driven.
When building microservices, in particular, Hayes notes that it is important microservices do not rely on static locations — as these can create single points more likely to fail.
“The solution must recognize that services may not be available at startup or may move during system processing. Service discovery is essential to delivering a resilient solution,” said Hayes.
Lightbend engineered Lagom with a focus on asynchronous services by default. Utilizing synchronous REST presents issues such as coupling. Lagom also offers developers a modern framework for building out microservices in Java with its event-based persistence, and out-of-the-box Command and Query Responsibility Segregation (CQRS). As James Roper, Lagom’s project lead said, “The more asynchronous communication you use, the more resilient and scalable your system will be.”
Many microservice frameworks available today require developers to manually run scripts in order to start their services, or add an automated infrastructure. Lagom realized the need for developers to be able to utilize the tools they were used to, such as hot code reloads — without having to install a new toolset locally in order to test an application. Lagom allows for developers to manage hundreds of services from a command line. From there, users are able to perform testing, update services via hot code fixes, and more.
Powering the Pieces
Lagom relies on a number of additional technologies, including the Lightbend’s own Play Framework, Akka, Akka Streams, Akka Clustering and ConductR for resilience and auto-scaling. By utilizing Netty, REST and WebSockets for communication with applications or devices that require access to its services, Lagom assures high performance. Finally, Lagom utilizes Cassandra as its persistence store.
For those looking to get a head start working with Lagom, be aware that the production release isn’t available until early March 2016. That being said, companies can check out Lightbend’s Reactive Platform to decompose any of their existing monolith applications into microservices, or to create new microservices.
“What we observed was that while many of these companies had unlimited engineering resources and talent, the far greater pool of Java developers needed a more opinionated framework — specifically for Java — that enabled the construction of microservices built to run and scale on the JVM,” said Hayes. It is this which stands as the reason Lightbend opted to start out by first creating a Java API for Lagom, followed by a Scala API.
With the full release of Lagom, the Java community may have a powerful new tool in its arsenal for creating, managing, and scaling microservices to meet the rigorous demands of today’s applications.