Reputation: 4754
I have a domain in which exist team members that can assign tasks to each other. I have 2 bounded context:
TeamBC: Management of the team members and their info.
TaskBC: Management of tasks and their assignaments.
TeamBC is upstream and TaskBC is downstream. The concept "member" in the TeamBC is the concept "recipient" in the TaskBC. The recipient of a task is the team member who the task is assigned to.
I use sync integration, with rest api in TeamBC and ACL in TaskBC. Recipient is a VO in TaskBC.
My question:
When integrating with rest api (not using messaging between BCs), does the downstream context have to duplicate any data from the upstream? In my case... does the TaskBC have to store any data in its database from the member entity of the TeamBC ?
Upvotes: 0
Views: 870
Reputation: 14064
It doesn't have to duplicate anything but can.
With event-only integration via messaging, BC1
has no choice but store the interesting bits of information it got from BC2
upon message reception, because it cannot re-request them whenever it wants.
With REST API integration, there's no such restriction. However, forcing yourself to only store local copies and not reach out to the other BC at will still has the advantages of relative asynchrony and/or fewer direct calls.
Actually, you probably get one of the two : asynchrony if you choose polling and fewer direct calls if you choose BC1 => BC2
notification via API.
Upvotes: 1