New changes in Lagom 1.5 !!!

Reading Time: 2 minutes

In this blog, we will discuss the latest changes in the lagom v1.5.

TLS Support

Now framework provides/supports self-signed certificates for the both environment(dev & test). When we want to use it HTTP for the development we can enable it via:

lagomServiceEnableSsl := true

When we want to use TLS server for the test server, we can enable it via:

Setup.defaultSetup.withSsl()

Akka Management

Earlier Akka management uses dedicated HTTP routes to check the state of the actor system. Lagom provides the Akka management HTTP port and will add health check routes by default so that we can reuse library health checks.

Additional Routers

Now it is possible to extend a Lagom Service with additional Play Routers. We will not only expose the calls listed in Service.Descriptor but will also serve endpoints handled by additionalRouters. It will help in integrating Lagom service with existing. There are two forms for the additional router. One will take the Class<play.api.routing.Router>  and second will take the instance of play.api.routing.Router.

First way:

public class HelloWorldModule extends AbstractModule implements ServiceGuiceSupport {
    @Override
    protected void configure() {
        bindService(
                HelloService.class, HelloServiceImpl.class,
                additionalRouter(SomePlayRouter.class)
        );
    }
}

Second way:

public class HelloWorldModule extends AbstractModule implements ServiceGuiceSupport {
    @Override
    protected void configure() {
        bindService(
                HelloService.class, HelloServiceImpl.class,
                additionalRouter(new SomePlayRouter())
        );
    }
}

Cluster Formation

 It provides a new mechanism for joining the Akka cluster. So now there are two mechanisms for the same one which is used earlier Manual Cluster Formation and one is new which is Akka Cluster Bootstrap. But Akka Cluster Bootstrap is with the lower precedence. So if we are using seed nodes then there is no need to change anything but if we need to use join-self on a single node cluster then we need to disable Akka Cluster Bootstrap.

lagom.cluster.bootstrap.enabled = false

Deployment

Now Lagom no longer supports the Lightbend Orchestration or ConductR. It supports manually deployment process.

gRPC

Now it provides the support for cross-service gRPC calls.  It provides supports for gRPC is built on top of Play-gRPC using the new additional router feature in Lagom. gRPC must run on HTTP/2, Lagom already provides support for the same.

Initial support for Java 11

Lagom 1.5 introduces the support for Java 11. It has provided the change in the use of Java reflection in Lagom’s Java DSL that removes a known obstacle for running on Java 11. Running Lagom on Java 11 will be limited to the use of external services that either fully supports Java 11 too or run as a separate process to the Lagom app’s Java 11 VM.

Reference

What’s new in Lagom?


knoldus-advt-sticker

Written by 

Anurag is the Sr. Software Consultant @ Knoldus Software LLP. In his 3 years of experience, he has become the developer with proven experience in architecting and developing web applications.

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading