Scala Microservices by Jatin Puri & Selvam Palanimalai

Scala Microservices by Jatin Puri & Selvam Palanimalai

Author:Jatin Puri & Selvam Palanimalai [Puri, Jatin]
Language: eng
Format: azw3
Tags: COM051300 - COMPUTERS / Programming / Algorithms, COM051010 - COMPUTERS / Programming Languages / General, COM051280 - COMPUTERS / Programming Languages / Java
Publisher: Packt Publishing
Published: 2017-09-19T04:00:00+00:00


Lagom, on the other hand, solves a different problem; it has been designed to build microservices and to tackle common issues faced when building them. So, it is not fair to compare Play with Lagom. Instead, we would say that they complement each other so that an application can have a Play application along with Lagom microservices running in the background.

Play and Lagom both come from the same company—Lightbend Inc.

Brief overview of Lagom

Lagom is a Swedish word that means just the right amount or sufficient. A description on the Lagom website gives the inspiration for the name as:

Often, when people talk about microservices, they focus on the micro part of the name, assuming it means that a service should be small. We want to emphasize that the important thing when splitting a system into services is to find the right boundaries between services. A system of right-sized microservices will naturally achieve scalability and resilience requirements and be easy to deploy and manage. So, rather than focus on how small your services should be, design "Lagom" size services.

Lagom is built on top of Play and Akka. So, some of the Lagom configurations are Play and Akka configurations. Lagom is internally built using Scala, but it exposes a separate Java and Scala API.

The Scala and Java API are sufficiently independent (that is, plainly, one is not a wrapper on top of another), so our experience with the Scala API is very Scala-ish, rather than it being a Java wrapper and vice versa.

The default build tool for Lagom projects is SBT. There is also a Maven plugin available. However, in this book, we will use SBT for our code samples.

Lagom is opinionated. It considers a set of guiding principles as the de facto standard and incorporates them in its API. The guiding principles are based on the following points:

Asynchronous and non-blocking in virtually everything: The inter-service communication uses asynchronous IO and is built on top of Akka Streams.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.