-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why DID Document streaming (resolveStream
)?
#380
Comments
resolveStream
)?resolveStream
)?
@wyc there have been numerous issues, PRs, and special topic calls in the WG that have led to this design, e.g. see:
The PR that eventually introduced the two functions after a long discussion process is #331. It has links to various previous issues and PRs were all the discussions can be found. The short explanation is that in some situations, you can resolve a DID to a DID document in its abstract form, without ever having to serialize or parse the DID document in any concrete representation (JSON-LD, JSON, CBOR, etc.). An example is resolving a DID of the "did:key" method. In other situations, you resolve a DID to a DID document in one of the concrete representations (e.g. JSON-LD). In this case the DID document is returned as a byte stream and can be parsed by a client. |
Thank you for diligently adding the context @peacekeeper, I'm so glad we take notes. Will review the above. |
I largely agree with @jricher's points here, in that
I am willing to open an issue and do the work here, pending merge of #381. Two follow-ups:
|
I don't think so, we made that up ourselves. We briefly considered using WebIDL, but that is for concrete browser APIs rather than abstract function definitions.
The way I see it, this depends on how concrete DID methods and resolver implementations are architected. I could see potential dependencies between the two functions both ways:
I think this kind of architectural flexibility is one of the reasons why we ended up with two different functions, one that deals with the abstract data model, and one that deals with concrete representations. Further implementation details are out of scope for DID Core. |
This issue needs to result in a PR in the next 30 days or it will be closed/deferred to the next version of the specification. |
its been renamed https://w3c.github.io/did-core/#did-resolution "resolveRepresentation" Propose closing, and addressing any challenges raised by tests, when we have tests. |
The DID WG discussed this during the 2021-01-12 teleconference, the language has been renamed to "resolveRepresentation" (as @OR13 notes above). The group does not think that there is further action that needs to be performed for this issue. This issue will be closed in 7 days unless there are objections. |
I agree with closing this. |
No objections raised, closing issue |
Hi, I've been working on the DID URL Dereferencing section as per #364 and was also reviewing the DID Resolution section for consistency. I noticed that there were two functions,
resolve
andresolveStream
. To me, streaming is closer to an implementation detail, and I'm not sure that it's within our purview to require both modes. At this time I have to consider if DID URL Dereferencing needs streaming or not within the spec for my work. It seems to have been added here: 2da9671Unfortunately I couldn't find any discussion, so I'm opening an issue.
resolve
andresolveStream
?Here are some reasons I came up with that could make sense as to why things are they way they are:
I feel that if we changed the definition of
did-document
into one that also accepted byte streams, then we could eliminate the latter abstract function along withdid-document-stream
. Here's some possible language to make that happen:A: Incorporate Streaming
This is scary for the reason above, that an implementation never actually needs to return a conforming data blob.
B: Eliminate Streaming
I like this, in addition to suggest that an implementer MAY implement streaming functions in addition to this one.
Any answers to questions 1, 2, & 3 + constructive opining on my perspective above appreciated. Thanks.
cc (from git-blame) @peacekeeper @msporny @jricher
The text was updated successfully, but these errors were encountered: