Book Image

Practical Microservices

By : Umesh Ram Sharma
Book Image

Practical Microservices

By: Umesh Ram Sharma

Overview of this book

<p>A microservice architecture helps you build your application as a suite of different services. This approach has been widely adopted as it helps to easily scale up your application with reduced dependencies. This way if a part of your application is corrupted, it can be fixed easily thereby eliminating the possibility of completely shutting down your software. This book will teach you how to leverage Java to build scalable microservices. You will learn the fundamentals of this architecture and how to efficiently implement it practically.</p> <p>We start off with a brief introduction to the microservice architecture and how it fares with the other architectures. The book dives deep into essential microservice components and how to set up seamless communication between two microservice end points. You will create an effective data model and learn different ways to test and deploy a microservices. You will also learn the best way to migrate your software from a monolith to a microservice architecture.</p> <p>Finishing off with monitoring, scaling and troubleshooting, this book will set a solid foundation for you to start implementing microservices.</p>
Table of Contents (17 chapters)
Title Page
About the Author
About the Reviewer
Customer Feedback

Chapter 1. Introduction to Microservices Architecture

Software architecture can be defined as a set of rules or principles designed for a system that defines the elements, behavior, structure, and relationship between different components of a software system.

In the early 80s, when large-scale software systems started coming into existence, a need emerged to have generic patterns (or architecture) that would solve common problems faced while designing all those systems. The term ,"software architecture" started evolving from there. Since then, many types of architectures have been introduced to design large-scale software systems. The software industry has seen architecture styles from shared nothing to monolithic to client-server to n-tire to service-oriented architecture (SOA) and many more. One more addition to this list is microservice architecture.

Microservice is a word that has taken an exponential path of popularity in recent times among the software developer/architecture community. Organizations working on monolithic application architecture often complain about long release cycles, tedious debugging issues, high-maintenance road maps, scaling issues, and so on. The list is never ending. Even the exceptionally well-managed monolithic applications would need a tremendous amount of effort to handle these issues. Microservice is evolving rapidly as it offers an efficient way to cope with these kinds of issues. In simple words, we can explain it as breaking a large problem into relatively smaller services, and each service will play its own part.

The basic philosophy of the microservices architecture is, "Do one thing and do it exceptionally well".

The heart of microservices architecture is the Single Responsibility Principle (SRP). In microservices architecture, business tasks are broken into smaller tasks, and to accomplish each task, there is a microservice. In a system, there could be two microservices or 100 microservices, depending on business requirements and how well the task has been broken down. This type of architecture gives an organization many benefits, which were not possible in monolithic applications, and also, it has its own kind of overhead as well. We will discuss the benefits and tradeoffs of this kind of architecture in the upcoming sections.