0

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 ?

choquero70
  • 4,470
  • 2
  • 28
  • 48

1 Answers1

1

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.

guillaume31
  • 13,738
  • 1
  • 32
  • 51
  • Understood. I was wrong. I thought that using rest api intregration I had to mantain a copy of the member id. I donit have to duplicate anything if i dont want to. – choquero70 Oct 26 '17 at 19:04