mojaloop / design-authority-project

This is the Issue and Decision Log for tracking mojaloop and related Designs
1 stars 2 forks source link

Request Duplicate Check #29

Closed NicoDuvenage closed 2 years ago

NicoDuvenage commented 5 years ago

Request:

Please verify the Request Duplicate Check Design - see associated Sequence Diagram

Artifacts:

Decision(s):

Follow-up:

Dependencies:

Accountability:

Notes:

NicoDuvenage commented 5 years ago

The detail on the proposed solution after a meeting concluded on Jun 3, 2019, @ 19:00 SAST To be presented by Georgi to DA on Jun 4 and discussions to be held over for the regular weekly DA meeting on Wednesday. options:

  1. add completedRequest table a. <-- full accordance with the spec, insert ALL requests, which will support PUT operations b. <-- full accordance with the spec, insert only for invalid requests, which will support PUT operations
  2. simplify API by removing GET response on POST/PUTs and just respond with a "DUPLICATE ERROR"
  3. minimal validations up-front (pre-validations) prior to hash-check where we only store requests that "can be PROCESSED" by either the prepare or the fulfil handler and send the failed pre-validations to the audit log (edited)
NicoDuvenage commented 5 years ago

At the DA meeting on Jun 5th, 2019, an additional option (4) was added and seemed to be the one worth investigating further. A meeting between interested parties will be arranged for Friday, Jun 7th after which this log will be updated with the recommended approach.

mdebarros commented 5 years ago

The decision has been made by the DA to proceed with option:

In addition the DA made the decision that the Fulfilments should be immutable. This means that when a fulfiment is received it should be processed and be the final outcome of that specific transfer. E.g. if the fulfiment is invalid, it should be aborted and notifications sent out to the respective participants.

The only special case for this is when the fulfiment is sent from an invalid FSP (aka a non-participating FSP). The switch will NOT use the headers to route the notifications messages, but rather instead lookup the correct participants from the DB store to route the message appropriately.

This will then ensure:

mdebarros commented 5 years ago

Next steps:

elnyry-sam-k commented 5 years ago

Thanks Miguel, this looks good.