[This article by Jan Stenberg appeared originally on InfoQ.com]
Lightbend (recently renamed from Typesafe), the company behind Akka, has released an open source microservices framework, Lagom (Swedish for ‘just enough’), built on their Reactive Platform. In particular the Play Framework and Akka family of products are used, together with ConductR for deployment. By default, Lagom is message-driven and asynchronous, and uses distributed CQRS persistence patterns with event sourcing as the primary implementation.
One reason for the name Lagom is according to Jonas Bonér, CTO of Lightbend and creator of Akka, to remove the emphasis on micro (i.e. size) in microservices, it’s about having right sized services, not just small services.
In a conversation with InfoQ, Bonér shared his view on the new framework:
InfoQ: What are the major features of Lagom in your opinion?
Bonér: Features that I think makes Lagom unique compared to other microservices frameworks include:
Most microservices frameworks out there focus on making it easy to build individual microservices—which is the easy part. Lagom extends that tosystems of microservices, large systems—which is the hard part, since here we are faced with the complexity of distributed systems.
Communication is asynchronous by default—message and stream-based—but with the option of using other protocols, like synchronous REST, if needed.
Persistence is event-based by default—using Event Sourcing and CQRS—but has support for things like JPA and NoSQL databases if needed.
A fully integrated development environment, through which 100s of microservices can be managed with one command. It supports automatic hot code reload across all the services and is integrated with IDEs and other tools. The development environment is based on the production environment (through ConductR), thus directly supporting deployment and scaling up in production.
InfoQ: You describe Lagom as an opinionated framework?
Bonér: Yes. It is opinionated. We have learned a lot of lessons building Akka and Play Framework, and seeing our customers use our platform for building microservices—which they have been doing for years, even before the word microservice was coined.
Lagom is based on the Reactive principles (as defined in the Reactive Manifesto). This has a lot of implications and has guided the design of Lagom. The goal is to make it easy to do the "right thing" out of the box, and provides a guard-railed approach, with good defaults. But also allows you to deviate from them if you have good reasons and know what you are doing.
InfoQ: More specifically, what does Lagom encourage?
Bonér: We touched briefly on this above, but let me elaborate. Some of the key principles Lagom encourages, and makes easy, are:
NOTE: Lagom was released March 9th, 2016. For more information: https://www.lightbend.com/lagomRead More