Skip to content

How do you join data from different module if needed? #229

Answered by AndreiGanichev
duhjent asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, @duhjent
There was the same question in comments of Modular Monolith: Architecture Enforcement article. Here is Kamil's answer:

There is no simple answer for that question because it depends on context and requirements.
Solutions:

  1. Integrate modules by events. You can send an event like PremiumUserActivated and "Article" module will save this information for teaser/full article rule execution
  2. Execute 2 calls from GUI/API layer - one to "Articles" module, one to User module and combine data. It is called Composite View Pattern.
  3. Create separate module for reporting purposes. Get data by subscribing to events or using ETL mechanism (batch loads).
  4. Make a direct call from one module to an…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@magik110417
Comment options

Answer selected by duhjent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants