Accepted.
- Three independent subdomains (Catalog, Showtimes, Ratings) emerged during an Event Storming session
- Ratings and Showtimes modules depend logically on events from Catalog
- It should be easy to develop each module without need of changing another.
- Modules should be independent from one another in runtime.
- It is possible that some of these modules might need to be separate deployment units in the future, due to different scalability needs (some might be used more often than others).
Architecture will follow an event-driven architecture pattern. All inter-module communication will be asynchronous and through an event bus.
For the sake of development speed, until app is actually deployed to an environment, an in-memory event bus will be used.
Pros:
- Modules independence (in runtime and development)
- Failure resilience
Cons:
- Event broker maintenance
- Event contracts complexity
- Idempotence when consuming is a must (due to potentially duplicated events)
- Data duplication
Integration via database, especially in case of read models (read model would query database for write-side data from another module). That would introduce too much coupling in development.