InterviewSolution
| 1. |
How to partition a large application into microservices architecture? |
|
Answer» MICROSERVICES should be autonomous and divided based on business capabilities. Each software component should have single well-defined responsibility (a.k.a Single Responsibility Principle) and the principle of Bounded Context (as defined by Domain Driven DESIGN) should be used to create highly COHESIVE software COMPONENTS. For example, an e-shop can be partitioned into following microservices based on its business capabilities:
Responsible for product information, searching products, filtering products & products facets.
Responsible for MANAGING inventory of products (stock/quantity and facet).
Collecting feedback from users about the products.
Responsible for creating and managing orders.
Process payments both online and offline (Cash On Delivery).
Manage and track shipments against orders.
Market products to relevant users.
Manage users and their preferences.
Suggest new products based on the user’s preference or past purchases.
Email and SMS notification about orders, payments, and shipments. |
|