What are microservices
- First of all, it is an architectural pattern
- Microservice architectures are more independent and can be updated and published separately than individual architectures
- Services in microservices are used only for a specific business function
DDD
Conway’s Law: Organizational architecture corresponds to microservice fragmentation
DDD role
What really determines software complexity is the design method
- Helps guide us in determining system boundaries
- Ability to focus on the core elements of the system
- Help us break down the system
DDD common concepts – domain
- Domain: the domain has scope limits, can also be said to have boundaries
- Core domain: Core domain is the core value of business system
- Common subdomains: Consumers of all subdomains, providing common services
- Support subdomain: Focuses on an important part of the business system
E-commerce field to support commodity order core sales general SMS email
DDD common concept – bounded context
- Understanding: the meaning of context in Chinese
- Mode: domain + bounded context
- Purpose: Not how to draw borders, but how to control borders
Common DDD concepts – domain models
- Understanding: The domain model is an abstract representation of the problem to be solved in our software system.
- Domain: reflects the problems we need to solve in our business
Microservices Architecture
Principles of microservice design
- Domain driven design, not data driven design, not interface driven design
- Want well-defined microservices, not mud balls
- A clear hierarchy of functions, rather than a laundry list of everything
- Make microservices that you can hold, not microservices that are too fragmented