I have been learning to implement Microservices but I could not understand the term "bounded context"?
I could understand that it is concept which arises out of Domain Driven Design. But I could not understand the technical implementation of it.
I have looked at below links:
It is the biggest zone/area/place where a term has a consistent meaning (it means the same thing for the business specialists and the developers). I intentionally avoided using the word "context". Ideally, a Bounded context is exactly a Domain from the real world.
When it comes to microservices, a microservice should not be larger than a Bounded context.
UPDATE
A Bounded context
should be an independent domain, if the system is correctly designed; in reality, when things are not done correctly, a Bounded context
is larger than a domain. In large enterprises, some developers create objects (models) that try to capture all the behavior related to some term. For example, Product
in a Shop. This term is very broad. The Product
from the online-shop and the Product
from the inventory system are not one and the same thing, although they may seem that way. In this case, the online-shop should be bounded context and the inventory should be a different one.
Implementation
Each "product" should have a different class in each bounded context, for example. A bounded context can be implemented as (a better expression would be "can be seen as") a namespace
or package
in monoliths, or as a microservice in distributed systems.