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

New Profile Mechanism section #79

Merged
merged 3 commits into from
Jun 23, 2021
Merged

Conversation

benfrancis
Copy link
Member

@benfrancis benfrancis commented Apr 22, 2021

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

@benfrancis
Copy link
Member Author

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",
Copy link
Contributor

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

Copy link
Contributor

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"

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 suggest "Common Profile" #21 (comment)

Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

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 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": [
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

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"
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 constrained :)

Copy link
Member Author

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": [
Copy link
Contributor

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

Copy link
Member

@relu91 relu91 left a 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.

@danielpeintner
Copy link
Contributor

I know we have some wildlife but we might consider whether to use singular or plural form (profile vs profiles)

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
Copy link
Contributor

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, ...)

Copy link
Member Author

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.

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.

<section id="profiling-mechanism">
<h2 id="the-profiling-profile">Profiling Mechanism</h2>
<h2>Profiling Mechanism</h2>
Copy link
Contributor

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.

Copy link
Member Author

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.

@sebastiankb
Copy link
Contributor

From today's TD call:

  • we have to clarify how the consumer selects the profile when multiple are provided by the producer.
  • can a consumer mix profiles?

@benfrancis
Copy link
Member Author

  • we have to clarify how the consumer selects the profile when multiple are provided by the producer.
  • can a consumer mix profiles?

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.

@mlagally
Copy link
Contributor

@benfrancis
I think the new section with the examples adds value and should be factored out into a separate PR, so we can discuss it stand alone.
We the can debate the controversy, whether we should to eliminate the profiling mechanism section, that is a mandate of the charter, separately.

@benfrancis
Copy link
Member Author

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 profile member of the Thing Description, which accepts a URI identifying a profile.

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.

@mlagally mlagally merged commit 8da1330 into w3c:main Jun 23, 2021
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.

6 participants