You can also split a monolithic application into a microservice-based application based on its domain. The domain decomposition methods focus on a bounded context, which is a central pattern of Domain-Driven Design (DDD). Domain decomposition methods split a domain into subdomains. You can define services that correspond to the subdomains of the DDD, as shown in the following diagram:
The preceding diagram shows a decomposition based on subdomains. Each subdomain has a corresponding service. Subdomains can be classified according to business processes. For example, as you can see in the preceding diagram, we have decomposed the online bookshop application into the following subdomains:
Customer Account Management
Book Inventory Management
Order Management
Shipping Management
The main challenge of this approach lies in identifying the subdomains. Like business capabilities, subdomains are identified by analyzing the business and its organizational structure and identifying the different areas of expertise. Let's discuss the microservice chassis for common cross-cutting concerns.