-
Notifications
You must be signed in to change notification settings - Fork 8
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
New Profile Mechanism section #79
Conversation
Note: It may make sense to move this section of the WoT Profile specification to the WoT Thing Description specification. |
{ | ||
"@context": "https://www.w3.org/2019/wot/td/v1", | ||
"id": "urn:dev:ops:32473-WoTLamp-1234", | ||
"profile": "https://www.w3.org/2021/wot/profile/core", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
profile term does not exist yet, but I would be ok with profile
.
w3c/wot-thing-description#806
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still we need a good name for "core"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest "Common Profile" #21 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastiankb: 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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I will do it until the next TD meeting. That means we will have it available for the next WD release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastiankb
Please add a link to the PR that introduces the "profile" identifier in the TD spec to give context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a link to the definition of the profile member in the TD specification now that has landed.
{ | ||
"@context": "https://www.w3.org/2019/wot/td/v1", | ||
"id": "urn:dev:ops:32473-WoTLamp-1234", | ||
"profile": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting. +1 to define profile as string and array of strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be precise, the text above is read as if it should always be an array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastiankb The "array" AND "string" type definition is causing confusion now and then - as in the rest of the profile spec, I suggest to describe single value profile values always as arrays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@egekorkan Yes sorry that's unclear, I'll work on improving the wording.
@mlagally Given the vast majority of Things are likely to only conform to a single profile, I think that would be wasteful. It's only really complicated if it's not defined from the beginning, which then causes backwards compatibility problems in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@egekorkan OK, I've changed the wording, let me know if that's clearer?
index.html
Outdated
"id": "urn:dev:ops:32473-WoTLamp-1234", | ||
"profile": [ | ||
"https://www.w3.org/2021/wot/profile/core", | ||
"https://www.w3.org/2021/wot/profile/constained" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be constrained :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, fixed.
{ | ||
"@context": "https://www.w3.org/2019/wot/td/v1", | ||
"id": "urn:dev:ops:32473-WoTLamp-1234", | ||
"profile": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be precise, the text above is read as if it should always be an array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the idea of having a dedicated field to declare profile conformance.
I know we have some wildlife but we might consider whether to use singular or plural form ( |
index.html
Outdated
<a href="https://www.w3.org/TR/wot-architecture/#dfn-thing">Web Thing</a> | ||
conforms to multiple profiles, its Thing Description | ||
[[wot-thing-description]] MUST include a <code>profile</code> member whose | ||
value is set to an array of valid profile identifiers corresponding to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest a string
only for a single profile. An array
if multiple profiles are implemented. We have multiple places in the TD for such kind of approach (e.g., security
, @type
, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was what I intended to specify, so I need to revisit the wording to make this more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
<section id="profiling-mechanism"> | ||
<h2 id="the-profiling-profile">Profiling Mechanism</h2> | ||
<h2>Profiling Mechanism</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This MR does not contain a new profile mechanism section and it is not obvious
why the entire profiling mechanism section has been deleted.
Defining a profiling mechanism is part of the requirements for the profile spec,
so deleting this section is not an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"profile": "https://www.w3.org/2021/wot/profile/core"
That's the mechanism.
In my opinion this is all that is needed, and even this should probably be moved to the Thing Description specification and just referenced from here.
From today's TD call:
|
It's a bit difficult to define that until we know what other profiles may exist, but in general I'd say that Web Things can support multiple profiles, but Consumers should probably just pick one to use based on the protocols they support. There may be exceptions where they want to use multiple profiles, e.g. if they want to use WebSockets for events and HTTP for everything else. |
@benfrancis |
Hi @mlagally, the charter requires the "Definition of a mechanism to identify the profile or profiles that a given TD is conformant to." In my opinion this simplified version of the profile mechanism section fulfils that requirement while removing a lot of unnecessary text. The mechanism to identify that a given TD is conformant with a profile is the Being conformant with a profile simply means conforming with all of the normative statements in its specification. I have added some additional text to make that more clear. Simply adding more text to what's already there would not fulfil the goal of this PR, which is to simplify the profile mechanism. |
4e29e7d
to
d1933e4
Compare
This PR proposes a new simplified Profile Mechanism section which simply defines a mechanism to denote that a given Web Thing conforms to a particular profile.
As discussed in #73 (comment) and #2
Preview | Diff