Book Image

Scala Microservices

By : Selvam Palanimalai, Jatin Puri
Book Image

Scala Microservices

By: Selvam Palanimalai, Jatin Puri

Overview of this book

<p>In this book we will learn what it takes to build great applications using Microservices, the pitfalls associated with such a design and the techniques to avoid them. </p><p>We learn to build highly performant applications using Play Framework. You will understand the importance of writing code that is asynchronous and nonblocking and how Play leverages this paradigm for higher throughput. The book introduces Reactive Manifesto and uses Lagom Framework to implement the suggested paradigms. Lagom teaches us to: build applications that are scalable and resilient to failures, and solves problems faced with microservices like service gateway, service discovery, communication and so on. Message Passing is used as a means to achieve resilience and CQRS with Event Sourcing helps us in modelling data for highly interactive applications. </p><p>The book also shares effective development processes for large teams by using good version control workflow, continuous integration and deployment strategies. We introduce Docker containers and Kubernetes orchestrator. Finally, we look at end to end deployment of a set of scala microservices in kubernetes with load balancing, service discovery and rolling deployments. </p><p></p>
Table of Contents (12 chapters)

Work Stealing - what makes Play fast!

Programming is interesting and fun. But what if, as well as programming, you also love food? (I always wanted to be a food critic when I was a kid). And because life is too short to have leftover desires, you decide to share your love of food with others by opening a food takeaway restaurant serving your favorite dishes.

The idea is simple—to open a takeaway restaurant in the most crowded place in the city, where people would come for lunch. There is no seating at the restaurant (as you do not wish to spend a lot of your money), so people would need to stand in queue, pay at the counter, collect food, and head out.

At the initial stages, you decide to hire a cook. The cook would not only cook, but also take care of the money counter. We decide not to hire a special person for the counter management as we would like to save as much...