Book Image

Mastering Microservices with Java 9 - Second Edition

Book Image

Mastering Microservices with Java 9 - Second Edition

Overview of this book

Microservices are the next big thing in designing scalable, easy-to-maintain applications. They not only make app development easier, but also offer great flexibility to utilize various resources optimally. If you want to build an enterprise-ready implementation of the microservices architecture, then this is the book for you! Starting off by understanding the core concepts and framework, you will then focus on the high-level design of large software projects. You will gradually move on to setting up the development environment and configuring it before implementing continuous integration to deploy your microservice architecture. Using Spring security, you will secure microservices and test them effectively using REST Java clients and other tools like RxJava 2.0. We'll show you the best patterns, practices and common principles of microservice design and you'll learn to troubleshoot and debug the issues faced during development. We'll show you how to design and implement reactive microservices. Finally, we’ll show you how to migrate a monolithic application to microservices based application. By the end of the book, you will know how to build smaller, lighter, and faster services that can be implemented easily in a production environment.
Table of Contents (12 chapters)

Monolithic architecture overview

Microservices is not something new, it has been around for many years. For example, Stubby, a general purpose infrastructure based on Remote Procedure Call (RPC) was used in Google data centers in the early 2000s to connect a number of service with and across data centers. Its recent rise is owing to its popularity and visibility. Before microservices became popular, there was primarily monolithic architecture that was being used for developing on-premise and cloud applications.

Monolithic architecture allows the development of different components such as presentation, application logic, business logic, and Data Access Objects (DAO), and then you either bundle them together in Enterprise Archive (EAR) or Web Archive (WAR), or store them in a single directory hierarchy (for example, Rails, NodeJS, and so on).

Many famous applications such as Netflix have been developed using microservices architecture. Moreover, eBay, Amazon, and Groupon have evolved from monolithic architecture to a microservices architecture.

Now that you have had an insight into the background and history of microservices, let's discuss the limitations of a traditional approach, namely monolithic application development, and compare how microservices would address them.