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

Restructure WoT Core Profile section #78

Closed
wants to merge 2 commits into from

Conversation

benfrancis
Copy link
Member

@benfrancis benfrancis commented Apr 22, 2021

In #73 we have discussed reducing the scope of the Core Profile (name TBD #21) to focus on interoperability and no longer try to meet requirements around human readability and constrained devices (which often conflict with each other).

This PR therefore proposes modifying the WoT Core Profile to:

  1. Remove the WoT Core Data Model section for the reasons described in Refine Goals and Scope #73 (comment) and Reduce or remove the constraints in section 7.2 Baseline Information Model #10
  2. Remove the External TD representations section since JSON serialisation, optional JSON-LD semantic annotations and canonicalization will be defined in the Thing Desciption specification
  3. Add new sub-sections to the WoT Core Profile:
    1. Identifier - an identifier to denote that a given Thing Description conforms to the Core Profile
    2. Links - link relation types which conformant Web Things MAY use and conformant Consumers MUST support
    3. Security - security schemes which conformant Web Things MAY support and conformant Consumers MUST support
    4. Discovery - discovery mechanisms which conformant Web Things MAY support and conformant Consumers MUST support

A follow-up PR would be required to update the Introduction, Conformance and Profiling Mechanism sections to reflect these changes.

Note: This is a companion to #77 which proposes a new Protocol Binding section


Preview | Diff

<!-- Identifier -->
<section id="identifier">
<h3>Identifier</h3>
<p class="ednote">
Copy link
Contributor

Choose a reason for hiding this comment

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

should be in sync with w3c/wot-thing-description#806

Copy link
Member Author

@benfrancis benfrancis Apr 28, 2021

Choose a reason for hiding this comment

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

If profile is defined in the Thing Description specification, do you think this section is still needed in the Profile specification? Or should the Profile specification just refer to the relevant section of the Thing Description specification in its introduction for example?

Is anyone working on a PR for w3c/wot-thing-description#806 yet?

Edit: Comment moved to #79 (comment)

This section would just define a URI like https://www.w3.org/2021/wot/profile/common, which presumably doesn't need to be included in the Thing Description specification.

@egekorkan
Copy link
Contributor

A question about links, what does it mean to support a link relation type? Any Consumer can go to that link just by following it. Does it mean that if there is a link that means a user interface, the Consumer MUST have a rendering engine to display it?

@benfrancis
Copy link
Member Author

A question about links, what does it mean to support a link relation type? Any Consumer can go to that link just by following it. Does it mean that if there is a link that means a user interface, the Consumer MUST have a rendering engine to display it?

That's a good question. Perhaps in that case support should not be mandatory.

In the web interface of WebThings Gateway these types of links are just rendered as an icon with a hyperlink which when clicked opens the custom HTML user interface of a Thing in a new tab, but it's possible some Consumers may not have a user interface at all.

I've updated that text (which is so far just an editor's note) to say MAY instead of MUST.

@mmccool
Copy link
Contributor

mmccool commented Apr 29, 2021

We probably need to look at links on a case-by-case basis. Note also that actually following links is a potential privacy risk, so generally we should try to make TDs self-contained. Note that some links may also point back to the same source as the TD, eg for icons. These "same-source" links would be safer wrt to privacy. An alternative would be to embed such resources in the TD somehow, and maybe allow links to use a local json-pointer (of course binary data would need to be base-64 encoded or something).

Hmm. Maybe directories should cache resources like icons? I'll have to think about that.

@benfrancis benfrancis changed the title Remove WoT Core Data Model section Restructure WoT Core Profile section Jul 22, 2021
@benfrancis
Copy link
Member Author

benfrancis commented Jul 22, 2021

I have rebased this pull request to resolve merge conflicts and modified it to keep the list of required security schemes from the Core Data Model in the Core Profile security section.

@mlagally This pull request is 3 months old today, it would be great to discuss it in today's WoT Architecture call if possible.

@mlagally
Copy link
Contributor

@benfrancis
I already commented on the datamodel section that you deleted in the last architecture call and explained why we need it.

We agreed to prioritize interoperability over human readability, so the normative requirements of that section, that relate to human readability should be moved to the "recommended practice" sections of the corresponding subchapters.
This could be handled in a separate PR.

The additional text you created should be moved into a stand-alone pull request to make sure we can handle it separately and include it into the document in due course.

@benfrancis
Copy link
Member Author

benfrancis commented Jul 26, 2021

@mlagally wrote:

I already commented on the datamodel section that you deleted in the last architecture call and explained why we need it.

We agreed to prioritize interoperability over human readability, so the normative requirements of that section, that relate to human readability should be moved to the "recommended practice" sections of the corresponding subchapters.
This could be handled in a separate PR.

As discussed in the Architecture call on 22nd July, we agreed in #73 to reduce the scope of the Core Profile from its previous goals of:

  1. Interoperability
  2. Human readability
  3. Supporting constrained devices

to focus only on the goal of interoperability.

I am arguing that none of the constraints proposed in the current Core Profile Data Model section are needed for interoperability and only contribute to human readability and supporting constrained devices, and therefore the whole section should be removed. If there are any constraints or recommendations which we agree should apply to all web things, then I am suggesting they should be added to the Thing Description specification rather than the Core Profile.

I previously asked you for specific examples of constraints you felt needed to be kept and I responded to those specific points in #73 (comment), explaining why I don't think they help interoperability and in some cases may even harm interoperability. If you still believe there are specific constraints that should be kept because they contribute to interoperability, can you please either explain that here or by responding in #73.

@benfrancis
Copy link
Member Author

The additional text you created should be moved into a stand-alone pull request to make sure we can handle it separately and include it into the document in due course.

I also explained on the call that it doesn't really make sense for the proposed new sections to be added in a separate PR, because they don't make sense without the other changes. E.g.:

  1. The Links section contradicts current text in the Data Model section
  2. The Security section replaces current text in the Data Model section

</section>
</section>

This section defines the <a>Core Profile</a> by describing:
Copy link
Contributor

Choose a reason for hiding this comment

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

The new language should be added, however removing the core data model is not appropriate, since it will break profile use cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

We discussed the use cases and motivation for the common data model in the October vF2F. Please see presentation slides: https://github.com/w3c/wot/blob/main/PRESENTATIONS/2021-10-online-f2f/2021-10-27-WoT-F2F-Architecture%2BProfiles-Lagally.pdf

Copy link
Member Author

Choose a reason for hiding this comment

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

@mlagally I apologise for not being able to attend that meeting due to illness, but I see nothing in that presentation which convinces me that the data model constraints proposed in the current WoT Core Data Model section are necessary, or helpful. Please see my extensive comments in #93 (review) from July in which I reiterate why I think they are undesirable and in some cases conflict with the agreed goal of the specification. Ege has said he agrees with those comments, and I note that you haven't yet responded to them.

I get the impression that you are the only member of the group who thinks that including these data model constraints in the Core Profile is a good idea, and that the majority of members of the group actually think that the majority of the proposed constraints aren't necessary. I am happy to continue to discuss this further to try to reach a consensus, but if we can't reach a consensus then according to the Working Group's decision policy, I understand the Chairs may call for a group vote.

@@ -416,60 +402,6 @@ <h4 id="additional-definitions-">Additional Definitions:</h4>
<dd>
The Web of Things Thing Description as defined in [[wot-thing-description]].
</dd>
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree to remove.

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -386,18 +384,6 @@ <h4 id="additional-definitions-">Additional Definitions:</h4>
<dd>
Synonym for <a>WoT Core Profile</a>.
</dd>
Copy link
Contributor

Choose a reason for hiding this comment

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

agree to remove

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -198,8 +198,6 @@ <h3>Motivation for a Profile</h3>
<section id='sotd'></section>

<section id="intro">
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you want to remove a h1 heading?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's already commented out, this is just cleanup :)

Copy link
Member Author

Choose a reason for hiding this comment

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

(Same with the previous two removals)

Copy link
Member Author

Choose a reason for hiding this comment

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

<section id="identifier">
<h3>Identifier</h3>
<p class="ednote">
This section will define an identifier which can be included in a
Copy link
Contributor

Choose a reason for hiding this comment

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

text should be added

Copy link
Member Author

Choose a reason for hiding this comment

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


<section id="canonical-representation">
Copy link
Contributor

Choose a reason for hiding this comment

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

We need the section on canonical representation, since this may be removed from the TD.

Copy link
Member Author

Choose a reason for hiding this comment

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

What is the canonical representation used for in the WoT Profile specification, and why do you think it may be removed from the Thing Description specification?



<!-- Security -->
<section id="security">
Copy link
Contributor

Choose a reason for hiding this comment

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

We need a security section, however need to discuss the supported mechanisms under implementation constraints for plugfest members.

I suggest to exclude "no sec" and require basic auth as the minimum.
The other mechanisms need input from plugfest members.

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 agree this requires some discussion, but I strongly object to excluding the nosec security scheme. This is currently used by all 16 web thing libraries in the WebThings Framework and there can be good reasons for a web thing not providing its own authentication.

<li>define subscription mechanism</li>
<li>Examples</li>
</ul>
<!-- Discovery -->
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we will be able to define a discovery mechanism in the first profile release.

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've been thinking about this and I agree that might be the outcome.

Of the introduction mechanisms defined by the WoT Discovery specification, I think DNS-based Service Discovery could be a candidate for a mandatory discovery mechanism in the Core Profile, but that may be asking too much.

My current thinking is that Direct discovery could be made the mandatory discovery mechanism by simply requiring that a Thing Description conforming to the Core Profile must be resolvable through an HTTP URL which can be manually typed or copy & pasted in order to locate the Thing Description.

@mlagally
Copy link
Contributor

mlagally commented Nov 4, 2021

I reviewed this MR again, which has a lot of valuable parts.
However merging it as a whole does not work, since it contains too many contentious sections.

To move forward I recommend to split it as described in the individual comments.

@benfrancis
Copy link
Member Author

OK, I will split this PR out into smaller ones and close this one once that's done.

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.

5 participants