Open peacekeeper opened 7 years ago
On the issue of having two separate drivers vs one with both capabilities in it:
I think it would be nice to have one that could set itself up internally for either configuration based on ENV vars, but I am not sure how easy/feasible that is. If that's not a simple task, or hygienically poor practice, I would say just go with two separate drivers.
If we do two separate drivers, I think we should have a naming convention or pattern that denotes which is which, and clearly explain to folks who want to run the UR how they change the config to include the different types. Also, if we go with two drivers, we could check-in pre-built versions of the UR: one that has all known DID Methods included as light, and one that has all Methods included with their full variants.
I'm also not sure yet whether one configurable driver vs multiple drivers is better. I used to think strictly "one driver per method", but now I can more and more see the advantages of separating them in order to better isolate specific functionality.
Regarding a naming convention, one small problem I see is that it may not always be possible to strictly distinguish between "full" and "light". For example, to implement BTCR, the driver can include its own full node (very secure), or it could talk SPV (medium secure), or it could query a remote transaction explorer API (least secure). So there are three options, not just "full" and "light". Other DID methods in the future may have yet other, more complex variations.
But yes +1 to smart naming of drivers, and +1 to pre-built versions of the UR with different configurations depending on one's needs.
We looked at this issue on today' Universal Resolver weekly call, and it seems some of the content here is obsolete, and some of it belongs in different places (documentation, DID method specs, etc.).
We should re-use some of the content from this issue in appropriate other places, and then close the issue.
We discussed this on the 29 Sep 2021 Universal Resolver work item call, and agreed that the previous comment still applies.
We discussed that drivers (both for resolver and registrar) can work in different ways to fulfill their purpose, for example:
Some points to consider:
It seems a DID method spec should specify what behavior variations (level of verification, full node vs thin client, etc.) are supported. The individual drivers can then implement this (and may only support a subset of the variations).
The resolver/registrar and their drivers could expose an API that allows clients to discover which variations, configuration settings, request parameters, etc. are supported.