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)

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, and user input are shown as follows: "If the computation fails, the Future object will contain the cause for the failure (throwable)."

A block of code is set as follows:

    import scala.concurrent.Future 
import scala.concurrent.ExecutionContext.Implicits.global

val future: Future[Double] = Future{math.sqrt(100000)}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

    implicit val currentThreadExecutionContext =   
ExecutionContext.fromExecutor(new Executor { def execute(runnable: Runnable) { runnable.run() } })

Any command-line input or output is written as follows:

cd first-app
sbt

New terms and important words are shown in bold.

Warnings or important notes appear like this.
Tips and tricks appear like this.