Now that we've looked at the microservice architecture, let's now do a practical exercise to understand the concept in more detail. We will follow the microservice pattern to develop a simple online bookstore application.
We need to start by designing the application's architecture first. While designing microservice-based applications, first we need to think of a single monolithic application and then derive various parts or components that are independent of each other and can be thought of as possible candidates for being individual microservices.
We will break the application into small parts based on the criteria we looked at in the previous sections, such as single responsibility, service autonomy, loose coupling, encapsulation, and DDD, as follows:
- User management
- Order management
- Catalog management
- Inventory management
They are considered independent domains or business functions. We will create individual microservices...