Domain Driven Design Bounded Context Microservices
Arguably one of the most difficult microservices patterns to apply and implement is the bounded context.
Domain driven design bounded context microservices. From martin fowler s description of the bounded context each rectangle in the bounded contexts of his illustration could be one microservice so you d conceivably have one for tickets one for defects etc. The bounded context concept originated in domain driven design ddd circles. Microservices is an architecture design model with a specific bounded context configuration and dependencies.
Then i would provide an example. In the book domain driven design eric evans describes several patterns for maintaining the integrity of a domain model when it interacts with another bounded context. Sam newman a recognized promoter of microservices and author of the book building microservices highlights that you should design your microservices based on the bounded context bc pattern part of domain driven design as introduced earlier.
These result from the architectural principles of the domain driven design and devops. Chapter 2 talks in detail about how a domain is divided into bounded contexts and chapter 3 is the best source on drawing context maps. Domain driven design defines bounded contexts as the setting in which a word or a statement appears that determines its meaning.
I would try to explain bounded concept in a very simple and clear manner. Understanding the bounded context helps us form autonomous teams and by extension autonomous microservice. The bounded context is a key design pattern borne out of domain driven design or ddd.
Bounded context opens part iv strategic design. Vaughn vernon s implementing domain driven design focuses on strategic design from the outset. Sometimes a bc could be composed of several physical services but not vice versa.
Bounded context and microservices. First let s understand the meaning of the word context. One of the main principles of microservices is that services communicate through well defined apis.