ContextMapper / context-mapper-examples

ContextMapper DSL: Examples

Home Page:https://contextmapper.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an example in an asynchronous scenario

jabrena opened this issue · comments

Hi,

In the last months, I was exploring the project and I liked to much because the DSL allow exploring the different scenarios designed by Eric Evans:

  • Open Host Service [OHS]
  • Published Language [PL]
  • Anticorruption Layer [ACL]
  • Shared Kernel [SK]
  • Conformist [CF]
  • Customer / Supplier [C,S]
  • Partnership [P]
  • Separate ways *
  • Big ball of Mud *

but in relation to the technical context map patterns, I didn´t find an asynchronous example for example using a Broker. Maybe at BC level, it is not necesary to represent the physical way to communicate 2 BC but I have the impression that:

  • Open Host Service [OHS]
  • Published Language [PL]
  • Anticorruption Layer [ACL]

Are more oriented to blocking communications. In the other hand, if one BC need to send a Domain Event, maybe every BC send a message based on a contract so it is a kind of PL.

image

What is your opinion?

Many thanks in advance

Thank you for your positive feedback and question, @jabrena

Here's my view: on higher levels of abstraction (BCs of type feature in CML), the technical realization of the relationship patterns is not defined. As a domain-driven design and its implementation evolve (and we go to system type BCs in CML), this of course is one if the important architectural decisions to be made, with HTTP, gRPC, and asynch. message queuing (ActiveMQ, RabbitMQ, etc.) as options on the tech. level.

The DDD books and supporting materials actually recommend to let Aggregates communicate asynchronously (see here and here for pointers), even within one BC.

In CML, we added a relationship attribute to the Context Map syntax to express this choice (see here). Not sure we already feature asynch. context rels. in the examples repo though, so thank you for the suggestions.

Events definitely have their place, see https://contextmapper.org/docs/event-sourcing-and-cqrs-modeling/

Hope this helps
socadk aka Olaf