0

Let suppose that i have two bounded contexts: A and B.

In books i'm reading authors will only write "Context A maps into micoservice A'".

Now i'm working on a project (university assignment) in which i have one big context (A) that can (in my opinion) include a sub-context (B), as they both have the "same vision of the world".

When i started finding the realted microservices i have this architecture in which the big context (A) maps into two micro-services, one related to A itself, and one related to B.

Is this fine? or i'll just have to assume A and B as separate contexts?

2

I am not sure if nesting of bounded contexts is possible at all; I would say that if you're in such situation probably there're some modelling pitfalls in your design. Domain concepts should be relatively orthogonal between BCs, and what you're suggesting is a BC (nested) being a projection of a bigger one.

Onto your question, you can spread a given bounded context between multiple services given that the core model is shared between; this is called Shared Kernel in the DDD world. Depending on the concerns that lead you to such partitioning - you will probably have to partition based on application services or use cases. Heuristics here might be completely technical - eg: some service handling use cases heavily coupled with some storage technology or a given infrastructure adapter. -

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.