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)

Traditional deployments and machine images

Almost every operating system (OS) has its own package manager to install a new software in a manageable way. Let's say you want to use git on a Ubuntu 14.04 Linux OS to download your source code repository from GitHub; you will issue the following command:

apt-get install git

The apt-get command will search for the git package in its package repository server and download the dependency graph, and packages on top of git will be built. It will issue install commands for each package in the graph using the dpkg utility, run the following command:

$ apt-cache rdepends git

Running the preceding command lists out all dependencies of git, which is over 100 packages! Clearly, it's humanly impossible to install these dependencies in the correct order by hand without losing sanity.

For almost all platforms, whether a programming language...