-
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
Profile Mechanism 2.0 #285
Comments
I agree with almost everything that is proposed. Just that I would propose to keep the profile keyword since that could allow consumers to quickly understand what possible restrictions will be and if a profile makes a term mandatory, the Consumers of the profile can be written in an easier way with less if checks and more assumptions. |
Maybe it is just verbiage but I would still see profiles being a subset of TD which MAY use extension points provided by the TD specification (e.g.,
+1
This needs to go into the TD specification. Some more notes/questions on the examples you provided (i.e., first "simple example" using subprotocol).
Question to JSON-LD folks: Is this in the end the same if there a no name collisions? |
@egekorkan wrote:
I like the sound of that, but what would would go in the @danielpeintner wrote:
Yes, this is the kind of thing which could be clarified by a normative algorithm for parsing Thing Descriptions in TD 2.0. It's kind of implied in TD 1.x, but not explicitly stated.
The syntax isn't quite right because you missed out some curly braces, but yes that is equivalent. The downside of using prefixes in the |
This is a common signaling mechanism, although not really "semantic". Technically, the context just defines terms and a couple of other things which defines how to interpret terms. It would be possible to copy some of the terms from a context and use them to say the same things. An alternative would be to declare the profile using an |
Another idea about the design of profiles has come out of a discussion regarding the definition of the term "protocol binding" in the next WoT Workng Group Charter. This is because it has been essentially suggested that the term "protocol binding template" be renamed to "protocol binding" throughout W3C WoT specifications. This is potentially confusing because it could result in there being an "HTTP Protocol Binding" document as part of the Binding Templates work, but currently WoT Profile also defines an HTTP protocol binding. Profiles currently provide an alternative prescriptive mechanism for defining protocol bindings for greenfield applications instead of the descriptive mechanism of protocol binding templates for brownfield applications. One proposed solution to this conflict is to move the content of the "Protocol Binding" sections of profiles into a Protocol Binding document (e.g. "WoT HTTP Protocol Binding") and a Payload Binding document (e.g. "WoT JSON Payload Binding"), linked from the WoT Binding Templates registry. All of the prescriptive parts of the current protocol binding sections of profiles would become defaults in protocol and payload binding documents which all Consumers implementing those specifications would then have to support. Things could then opt-out of these defaults by overriding the protocol binding using the vocabularies provided in the binding documents. This would effectively combine the concepts of descriptive vs. prescriptive protocol bindings, where the latter is just a set of defaults for the former. This would then also allow a simpler approach to profiles where they just reference protocol binding documents and payload binding documents instead of defining a protocol binding inside the profile. The general approach would be that for each aspect of a Thing for which there are multiple implementation choices, a profile would prescribe a particular choice, e.g.:
Example profiles:
I would suggest we should try to keep the list of profiles as small as possible in order to maximise plug-and-play interoperability between greenfield implementations and not cause fragmentation. This approach would require that the task force working on Binding Templates are willing to accept the content from the current protocol binding sections of profiles into protocol binding and payload binding documents. The big advantage of this approach vs. using the CC @egekorkan |
To illustrate a bit more concretely how I imagine profiles and bindings could work together, below are example document outlines for an "HTTP Protocol Binding" specification, a "JSON Payload Binding" specification and an "HTTP+JSON Profile" specification which references them. HTTP Protocol Binding
JSON Payload Binding
HTTP+JSON Profile
Notes:
This would be a big change for Consumers, because all Consumers which implement a given binding would have to implement support for its default protocol binding (providing more interoperability by default), but it would also mean that Consumers which only care about Things which conform with a particular Profile would only have to implement the defaults used by that profile, and not support the full protocol binding vocabulary (which is much more complex to implement). Edit: There are some details I'm not sure about at the intersection of the protocol and payload bindings where the two currently work together in the HTTP Basic Profile. E.g. |
I think we should discuss a relationship with Binding Template TF and Profile TF. But I don't think any new specifications of binding template should be described at the profile document. If we want to describe some new specifications of binding template, we should propose them to Binding Template TF. Because if multiple documents have different binding template specifications, it will be difficult to maintain consistency, and it will be difficult for engineers who use it to understand. So the binding template specification should be described in the Binding Template documentation, not the Profile documentation. |
@chachamimm wrote:
Yes, as I said in #285 (comment):
Please see w3c/wot-binding-templates#248 for that discussion. To be clear, I am not proposing that "binding templates" would be defined in the Profile specification, but that the Profile specification would reference and depend upon default bindings defined in the protocol and payload binding documents already proposed for the next charter. |
I have created a WoT HTTP Basic Profile 2.0 (and companion WoT HTTP Protocol Binding 2.0) strawman proposal to explore the ideas discussed in this issue in more detail. See my email on the WoT WG mailing list for more explanation. Feedback is welcome here. |
I like the suggested direction, but I'd like to have the TD 2.0 itself see an overhaul first since it might make some of the profile and bindings sections simpler. |
Note: Maybe it is also good to share some ideas/proposals to
|
@lu-zero wrote:
I agree, but I think those activities are going to have to happen in parallel since they are so inter-dependent. It may also make sense to move some assertions (e.g. section 8.3.1 Protocol Binding based on HTTP) out of the Thing Description specification as part of that process.
What is degraded consumption? |
What is the expectation on the consumer that may have no full knowledge of what is in the thing being consumed e.g.:
Sometimes you have to completely omit the affordance, sometimes can just omit the form and fallback to known ones. |
@danielpeintner wrote:
These are good questions, and currently I would say it's mainly a case of resources. Oracle have stepped back and I have been told that Profiles are not currently a priority for Siemens. Personally I would like to continue to be an editor of WoT Profiles 1.0 and get it published as a Recommendation, because it's going to be a long time until the WoT 2.0 specifications are published and I believe something is needed in the meantime. Currently I am trying to find a source of funding to support that work, and I can't do it alone. (I understand that @lu-zero would like to contribute, which is great). Given the lack of implementations of WoT Profiles 1.0 I also think there's an argument for just publishing the current version as a W3C Note, and moving onto a refined design for WoT Profiles 2.0 which may attract more implementations. I think there's a general agreement that Profiles are needed, but I sense there are some reservations (see my original post) about the 1.0 approach (necessitated by limitations of the TD 1.x specifications). For the record, my answers would be:
|
@lu-zero wrote:
These seem like general WoT questions not specific to Profiles, but I would say that if a Consumer encounters vocabulary terms using a context extension it doesn't implement then it should ignore them. In general I expect Consumers to choose a Form which uses a protocol binding it implements, and ignore affordances which don't have any Forms it can use. I also think it's reasonable for Consumers to only support Things which conform to a particular profile, and to ignore individual affordances which fall out of the scope of that profile (there's a note to this effect in the existing spec and my strawman proposal, but we could be more explicit about what can safely be ignored). |
Yes we need to write it at least in TD 2.0.
This seems to be the consensus to me as well, there are corner cases when a protocol binding wants to insert terms within the data schemas, in that case we might have terms fine to ignore or something that makes the whole affordance invalid.
That would be one of the best selling points for profiles: if a consumer supports a profile and a thing signals a profile they would fully interoperate within that profile, a consumer understanding only part of the context cannot ensure it can consume even minimally the thing w/out trying. |
Questions About Profiles
During the review of WoT Profile 1.0, lots of fundamental questions have been asked about the nature of profiles.
Current Profile Mechanism
The current profile mechanism definition simply says that "In order to conform with a profile, a Web Thing MUST conform with all the normative statements in the profile's specification." Because there are no constraints on what those normative statements can say, the answer to all of the above questions is essentially "anything goes". We can only debate on a profile-by-profile basis what a profile should and should not do. Because a profile is just identified by a URI, anyone could technically define their own extension profile and there are no restrictions on what those profiles can do.
Member Suggestions
A couple of suggestions have also recently been made by working group members:
Profile Mechanism 2.0
Drawing from these ideas, I'd like to suggest an alternative approach to profiles (potentially targeted at WoT Profile 2.0) which could resolve some of these issues by more tightly constraining what profiles can define:
subprotocol
member of Forms@context
member of Thing DescriptionsThe answers to questions posed above would be:
Specification Changes
What would this mean for the existing WoT Profile specification?
@context
instead ofprofile
, and constrain profiles to being JSON-LD contexts, rather than an unconstrained set of normative assertions.Advantages & Disadvantages
Advantages:
subprotocol
member.@context
and Forms, rather than a separateprofile
memberprofile
member, since the existing@context
member could be used instead.Disadvantages:
Examples
A simple example of using a sub-protocol defined via a semantic extension:
A more complex example of profiles defined as semantic contexts, derived from Example 22 in the WoT Profile specification:
The text was updated successfully, but these errors were encountered: