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

Spring


Spring is an amazing framework. Those who are working in Java and have worked with Spring in the past or are working with it presently already know its benefits. Those who are in Java but didn't work in Spring yet should consider it seriously. Spring is a lightweight framework that basically works on plain POJO objects with the dependencies injection principle. The responsibility of creating a new bean or object is taken by the framework itself. The life cycle of these types of objects is maintained by the framework. It encourages the modular approach in programming. AOP and transaction management are some of the essential bits in any project; these are provided by Spring with the boiler plate code available.

Architecture wise, Spring has a core container and many other projects to support various needs. Spring core container includes the following modules:

  • Spring code module
  • Spring bean modules
  • Spring context
  • Spring Expression Language (SpEl)

On top of these core modules, Spring has many other modules for making a robust Java-based application. Modules for database access, transaction management, security, Spring integration, batch processing, messaging, social plugin, Spring cloud, and so on; some of the modules that make code much simpler and easy to do efficiently. The benefits of Spring can take a whole book to discuss, and discussing the benefits of Spring is out of the scope of this book. So, in a nutshell, the Spring moulder approach is helpful for a Java-based developer to write a cleaner and efficient code. However, there is a small pitfall of Spring in terms of configuration. An average application written in Spring is likely to use more than four modules of Spring (core container, Spring MVC transaction management, database access). As the project grows, these module numbers can increase, and configuration and compatibilities between different versions of modules can become cumbersome. To make life easy for a developer, Spring Boot comes into the picture.