Here is the situation. System A sends the notification as it completes the work items to System B. System A does not know how many items the project consists of. It's just a pass-through system. System B knows the number of items. Once sys B receives the notification for the last item, it has to wait for the final authorization and send the close-project notice to system A.
My question is should I try to implement the entire communication as:
- one asynchronous REST API, or
- two synchronous APIs, one for items completion (from A to B) and the other one for the final approval transaction (B to A)?
system A ----------- system B
item 1 done ------------ >
<---------- got it ------
item 2 done ------------->
<---------- got it ------
. . .
item n done ------------- >
<-------------------- ----got it but waiting for the manager's approval. may take weeks.
.... may take days/weeks
< ------------------------Manager signed. The project is closed and here are the details.