Date: 2020-02-29
Accepted
Some common data should be used by several bounded contexts (modules, in the case of monolith application).
We will create the dependency between modules. After setting up the dependency, needed method can be called from another module.
The modules will not communicate by direct calls, so the dependency between modules is not needed. Common data can be duplicated inside the modules during executing the listener for particular events.
Communication between bounded contexts asynchronous. Bounded contexts don't share data, it's forbidden to create a transaction which spans more than one bounded context.
- https://www.infoq.com/news/2014/11/sharing-data-bounded-contexts/
- http://www.kamilgrzybek.com/design/modular-monolith-primer/
- https://github.com/kgrzybek/modular-monolith-with-ddd#37-modules-integration
This solution reduces coupling of bounded contexts through data replication across contexts which results to higher bounded contexts independence.