Skip to content
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

Rework Data Model section. #455

Merged
merged 8 commits into from
Nov 17, 2020
Merged

Rework Data Model section. #455

merged 8 commits into from
Nov 17, 2020

Conversation

msporny
Copy link
Member

@msporny msporny commented Nov 8, 2020

This PR implements a number of resolutions made during the last DID WG virtual face-to-face meeting. Namely, it adds different classes of properties, defines all datatypes, and moves representation authoring rules to later in document.

Reviewers should look at the rewritten Data Model section here:

https://pr-preview.s3.amazonaws.com/w3c/did-core/pull/455.html#data-model

and the representation authoring guidelines that was moved here:

https://pr-preview.s3.amazonaws.com/w3c/did-core/pull/455.html#creating-representations


Preview | Diff

Add different classes of properties, all datatypes, move
representation authoring rules to later in document.
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@iherman
Copy link
Member

iherman commented Nov 9, 2020

Would it be possible to merge this branch into #454 (or merge #454 into this one)? This PR misses the rules on representation specific properties (ie, resolution 5 and resolution 6) while those are the focus of #454. These are the two sides of the same coin, and it is a bit difficult to comment on each of them separately...

</ol>
<p>
In order to maximize interoperability, representation specification authors
SHOULD register their representation in the [[?DID-SPEC-REGISTRIES]].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to provide an "example" of how to do this. w3c/did-extensions#154

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but think that would be best handled in another PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Also note that the "contents" of those specifications have 3 examples in DID Core: JSON, JSON-LD, and CBOR.

Copy link
Member

@brentzundel brentzundel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor editorial suggestions, otherwise LGTM.

Comment on lines +1140 to +1143
different classes of properties. The first class of properties are called
core properties, and are specified in section <a href="#core-properties"></a>.
The second class of properties are called representation properties, and
are specified in section <a href="#representations"></a>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the two buckets. I'm not sure if we want to bikeshed the names here, or whether we should worry about that after the primary changes in the spec (i.e., after this PR is merged).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect we'll bike shed the names in another PR. This PR assumes that we'll do that later.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
</ol>
<p>
In order to maximize interoperability, representation specification authors
SHOULD register their representation in the [[?DID-SPEC-REGISTRIES]].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but think that would be best handled in another PR.

@msporny
Copy link
Member Author

msporny commented Nov 11, 2020

@iherman wrote:

Would it be possible to merge this branch into #454 (or merge #454 into this one)?

I was trying to keep the PR relatively small and focused, dealing w/ the base set of changes to the data model per the virtual face to face in this PR, and then @dlongley adding on top of it to address other resolutions made (that he was asked to write a PR for).

Now that we have multiple approvals for this PR, I'm hesitant to do that @iherman because it could affect the review results. I know it's a pain to review, but I'd rather keep the two separate given that we have multiple positive reviews with changes made based on those reviews. We'll have to deal with #454 as a separate PR.

@kdenhartog
Copy link
Member

@iherman wrote:

Would it be possible to merge this branch into #454 (or merge #454 into this one)?

I was trying to keep the PR relatively small and focused, dealing w/ the base set of changes to the data model per the virtual face to face in this PR, and then @dlongley adding on top of it to address other resolutions made (that he was asked to write a PR for).

Now that we have multiple approvals for this PR, I'm hesitant to do that @iherman because it could affect the review results. I know it's a pain to review, but I'd rather keep the two separate given that we have multiple positive reviews with changes made based on those reviews. We'll have to deal with #454 as a separate PR.

It appears all approvals from Orie, Brent, myself, and Dave (author of #454 and approver of this PR) on this PR have also approved the other PR if it makes it easier to get both through with fewer merge conflicts. Hard to say what other reviewers will view as controversial though and so the age old wisdom of keeping PRs small and focused would lean me towards keeping separate as well.

index.html Outdated
@@ -2250,6 +2329,36 @@ <h1>Core Representations</h1>
for more information.
</p>

<section>
<h2>Creating Representations</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest changing this heading to "Representation Requirements" but it's okay to do that in a subsequent PR as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@talltree talltree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major improvement. Let's pull in ASAP. Can be tweaked by subsequent PRs.

Copy link
Contributor

@peacekeeper peacekeeper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, I continue to believe that it's a mistake to include representation-specific syntax in the abstract data model and other representations (e.g. to see @context in a YAML file). But I agree this PR reflects the decisions recently made during the TPAC DID WG F2F.

index.html Outdated
<ol>
<li>
A representation MUST define an unambiguous encoding and decoding for all
property names and their associated values as defined in this specification.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be defined in terms of the types associated with the property values and not the values themselves. It's a subtle difference, but it allows us to continue to talk about things in terms of property definitions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. I just moved the text in this PR and expect that we'll make the change you suggest in a subsequent PR, when the "Representation Requirements" section is updated with rewording / new rules that we might have missed (like how you register a representation in the DID Spec registries).

index.html Outdated Show resolved Hide resolved
are conformant with the fragment processing rules defined in section
<a href="#fragment"></a> of this specification.
</li>
</ol>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The representation must also define default generic type processing rules for consumption of all data types within the representation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not understanding how this differs from a representation defining unambiguous encoding and decoding for all property names and the data types of their associated values, could you clarify?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I understand what @jricher is getting at, and that's planned for a future PR. Basically, each representation must list all the abstract data model data types and how you express those concretely in the representation. The representation sections kinda/sorta have this right now, but if this PR goes in, we'll be able to be far more explicit and prescriptive about those serializations in each representation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msporny has the right of it, but it also needs to clearly go both ways, to and from the data model data types and the representation's data types. So you need things like this strawman:

"If you see an Integer in the ADM it goes in a JSON Number"

As well as:

"If you see a JSON Number in the representation, and don't have an additional property definition, it is an ADM Float".

I'm ok with this being in a separate PR but this can't be lost.

index.html Outdated
Comment on lines 2342 to 2345
A representation MUST define an unambiguous encoding and decoding for all
property names and their associated values as defined in this specification.
This enables anything that can be represented in the <a>DID document</a> data
model to also be represented in a compliant representation.
Copy link
Member

@brentzundel brentzundel Nov 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jricher would wording this address your concern?

Suggested change
A representation MUST define an unambiguous encoding and decoding for all
property names and their associated values as defined in this specification.
This enables anything that can be represented in the <a>DID document</a> data
model to also be represented in a compliant representation.
A representation MUST define an unambiguous encoding and decoding for all
property names and the data types of their associated values, as defined in
this specification. This enables anything that can be represented in the
<a>DID document</a> data model to also be representable in a compliant
representation.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@msporny
Copy link
Member Author

msporny commented Nov 17, 2020

Normative, multiple reviews, changes requested and made, no objections, RESOLUTION to merge, merging.

@iherman
Copy link
Member

iherman commented Nov 25, 2020

The issue was discussed in a meeting on 2020-11-24)

  • no resolutions were taken
View the transcript

3. PR 454 and 455...

See github pull request #454, #455.

Brent Zundel: status update?

dlongely: we are waiting for a response from mike jones regarding the suggestions for adding a note to the PR / regardign @context in the JSON representation section.
… unsure if he is still objecting

Brent Zundel: I will ping him again

Markus Sabadello: after merging 455 and then 454 we still need to revisit the exact terminology... lots of different properties type to hammer down.

See github issue #463.

Markus Sabadello: feedback welcome

Brent Zundel: other PRs that need to be discussed in this meeting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants