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
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Future of microservices


Along with their pros and cons, microservices are gaining popularity these days. With more and more people using this concept, there can be new problems, new patterns to implement microservices, and new demands from microservices on the table. Those demands and common problems will give the direction or lead the future of microservices.

Increasing the number of microservices in the organization also increases the DevOps work. DevOps has to deal with problems such as lots of deployment pipelines, log handling in a centralized place, monitoring service and server attributes, self-healing script, and so on. With a DevOps mindset, developers have lots to do other than only developing business logic. With an increase in DevOps effort, microservices could lead us in two directions:

  • Serverless architecture
  • Microservices as PaaS

Serverless architecture

Serverless architecture, with certain offerings from different cloud providers, doesn't seem too far. For instance, AWS has an incredible feature named Lambda function. Typically how it works is a bunch of code stays in your S3 environment as a ZIP file. Whenever a specific event is triggered, a new instance is created with predefined parameters. This particular piece of code is copied from a specified location to the new instance, and this code starts running. After finishing its job, the instance will be shut down again. With service discovery pattern, this whole concept becomes very interesting. In this type of environment, services will be coming up and down as per demand. Each new upcoming service will be registering itself and deregistering itself on going down, and it uses discovery protocol to find the service with which it needs to communicate.

The above mentioned architecture doesn't give the whole solution for serverless architecture, for instance it doesn't explain the versioning of services, how to deal with latency time, which new on demand services take to coming up for a new HTTP request and so on. The boot up time of the instance and services will be crucial in this scenario. Evolving of these type of component like Lambda from cloud providers, can lead future to server less components. Developer will be focusing on the development of business component. DevOps work will be lesser in this case.

Microservices as PaaS

Microservice as PaaS can be another future direction. Microservices will be delivered as Platform as a service (PaaS). With containers such as packer or Docker in place, this also seems to be feasible. In this scenario, microservice will be shipping with frameworks that do most of the monitoring, logging, and registering a service mechanism, common library, load balancing, versioning, and similar kind of features in itself. Containers are in place leading microservices in somewhat of the same direction. They can be seen as a framework, coming with all the monitoring, logging and so on already in themselves. Developers have to worry less about for all that stuff.

As containers become more mature and cloud components evolve, we can see the merging of both directions into one in the long run.