microservices-datadriven icon indicating copy to clipboard operation
microservices-datadriven copied to clipboard

Finish External Transfer for Parse CloudBank

Open ddrechse opened this issue 2 years ago • 0 comments

Currently, Parse Cloudbank External Transfer implementation just send an event via AQ to the remote Bank that then deques the msg and processes the Transfer.

To complete the Transfer in accordance with Microservices patterns:

  1. Add a txid to the local banks debit database record. This could happen in before save logic. Save the txid for use in the After Save msg Q action
  2. Add a status of Pending to the database record in beforeSave
  3. On AfterSave, add the txid to the the msg. This will correlate the remote database record with the local database record This should be fine, saving the txid in BeforeSave and using it in AfterSave becuase Parse is inherently single threaded
  4. When the remote bank deques the msg, it should send a response msg back to the local bank indicating if the insert was successful or not This logic will be similar to how the Qing was set up to support a transfer request from the local to the remote except it will go the other way, from remote to local
  5. Local bank will deque the remote transaction status record and look up the corresponding local record and set the Status to Complete on success or remove the Debit record on failure

Definition of Done: xternal Transfer is completed and completes the loop from remote back to local to verify transfer transaction completeness

ddrechse avatar Jul 07 '22 14:07 ddrechse