mojaloop / design-authority-project

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

Should the PISP implementation live in the `sdk-scheme-adapter`, or should we make a new `thirdparty-scheme-adapter`? #51

Closed lewisdaly closed 2 years ago

lewisdaly commented 4 years ago

Request:

As for the sdk-scheme-adapter (which the mojaloop-simulator uses behind the scenes), since the PISP API will be quite a different from the Mojaloop API, should we:

Option 1:

Option 2:

Artifacts:

See the above doc for more details, but also:

Screen Shot 2020-09-02 at 12 16 19 pm Screen Shot 2020-09-02 at 12 17 26 pm

Decision(s):

Follow-up:

Dependencies:

Accountability:

Notes:

lewisdaly commented 3 years ago

We discussed this further on our DA Meeting on 26/08/2020.

Some of the key points were noted:

  1. In order to take advantage of Typescript, and to help speed up development, the PISP workstream has gone ahead and separated out the thirdparty-scheme-adapter already.

  2. One of the challenges identified with the "multi-scheme-adapter" approach was for cases where there are shared resources between the APIs, such as GET /parties/{type}/{id}.

Our decision to break the Thirdparty API into it's own API (and not extend the FSPIOP-API) was predicated on the idea that "not all participants will want thirdparty functions", and therefore shouldn't have to worry about them. As a part of the decision to keep a separate Thirdparty API, we decided that some resources would be duplicated between the two.

This could lead to problems down the line, where callbacks to some resources might not be able to reach their desired destination: for example if a DFSP needs to listen for PUT /parties/{type}/{id} callbacks for both the FSPIOP API and the Thirdparty API, it may not be possible for DFSPs to route such callbacks to the right place.

The more I think about this issue, the less I think it's related to the scheme-adapters, but is more related to API design. We need to be careful not to be too prescriptive with how we think DFSPs will run their services - be they separate, all together, behind an API Gateway: it shouldn't concern us, and we should, in our API design, allow for anything.

@lewisdaly will spend more time working on some diagrams and design documents, and come back to the DA shortly

lewisdaly commented 3 years ago

Update as of 02/09/20:

See this draft document for the latest thinking and some examples of mitigations.

lewisdaly commented 3 years ago

We discussed this on 02/09/20.

In principle, it was decided that the fact that there are shared resources between APIs is coincidental, and should not dictate the way DFSPs and PISPs run their services - whether or not they share infrastructure to handle the common resources between the APIs is up to them.

We still have more to discuss around ensuring that APIs can be appropriately distinguished between (there was some talk of using the vendor tag in the Accept and Content-Type headers).

It was agreed that we will revisit this at a later date once we have more work done on the separate thirdparty-scheme-adapter, but in principle, there is no reason that we shouldn't have a separate scheme adapter.

mdebarros commented 3 years ago

We discussed this on 02/09/20.

In principle, it was decided that the fact that there are shared resources between APIs is coincidental, and should not dictate the way DFSPs and PISPs run their services - whether or not they share infrastructure to handle the common resources between the APIs is up to them.

We still have more to discuss around ensuring that APIs can be appropriately distinguished between (there was some talk of using the vendor tag in the Accept and Content-Type headers).

It was agreed that we will revisit this at a later date once we have more work done on the separate thirdparty-scheme-adapter, but in principle, there is no reason that we shouldn't have a separate scheme adapter.

I agree with this, it's really up to the Hub Operator how they wish to segment their APIs, and present them to their customers.