lundi 2 février 2015

Validating across bounded contexts in Domain Driven Design (DDD)?

I have a project with two bounded contexts; game and sidegame.


In some cases I need to do validation across both bounded contexts. For example, if a player wants to play a sidegame then it must be validated they are playing the "main" game also.


In DDD what patterns can be used to achieve this? So far I have considered:



  1. Event driven messaging between the contexts, but this feels weird as I end up with aggregates in partial states (i.e. waiting for a player to be validated).

  2. Shared data, where ONYL ONE bounded context can read. I'm not sure if this is a DDD anti-pattern?

  3. That perhaps my bounded contexts shouldn't be separate. However, I want to avoid creating a single massive domain context.


Any advice would be appreciated.


Aucun commentaire:

Enregistrer un commentaire