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
Oracle review comments on simplified TD draft snapshot on 27.4. #133
Comments
Michael, many thanks for your review! This helps a lot to quickly improve the new TD version. @takuki can you take care of it? This would be great. |
The sentence is now replaced by
|
done |
done |
sentence is replaced by
|
This part will be replaced by
|
I changed the text in this chapter to provide more background:
|
This is a standard phrase as provided here https://tools.ietf.org/html/rfc2119 |
I made this part more abstract and simple wrote:
Other parts were removed |
There is now a different explanation:
|
|
done |
|
Noooooo, no, no! :) This is exactly what we want to avoid! There is only one JSON-based serialization or rather representation format for TDs, which is identified by the Media Type The representation format follows the rules of JSON-LD 1.1, so that serializer/parser implementations can choose between two approaches: (a) plain JSON processing with handling of the terms baked into the implementation (comparable to a SenML implementation) or (b) JSON-LD processing where a JSON-LD library is used to convert the TD serialization into an internal representation (structured data in the memory of the process handling the TD). node-wot uses approach (a) Thingweb Directory uses approach (b) In fact, both approaches can decide to ignore semantic annotations. However, it is more likely that approach (a) omits the support completely or only supports specific terms relevant to the application. For instance, it could not produce any @... entries when serializing and ignore all @... entries when parsing; or only parse values of |
Note that there can be other representation formats for TDs that are not JSON-based, for instance a CBOR-based format identified by |
For a full disclosure, I should probably add that a TD information model, i.e., and internal representation, can also be constructed from a JSON-LD 1.0 representation format identified by However, let's leave this out of the TD spec and leave it to people who know what they are doing. We might inform about this in an informal document. |
You just describe what a parser has to do. But, how are you going to formulate/describe what is transported on the wire? There we have a JSON-LD valid format and a non JSON-LD valid format. Right? |
Good question which I also ask myself. In the previous version we defined the link as array. We should ask the group if object representation would be also ok. |
No. On the wire are representation formats (e.g., HTML, CSS) that are identified by Media Types (e.g., We wanted and agreed to avoid releasing different representation formats for WoT Thing Description (i.e., JSON-LD 1.0 vs JSON TD). Thus, the TD deliverable has to specify only one representation format, and the consensus was to do so, giving it the Media Type That means, it does not matter if the format has, for instance, an |
So, to conclude what we have is:
|
For the WoT Thing Description deliverable we have:
In future deliverables we might have these two, but will not be able to define them in the current charter period:
An out-of-band mechanism to also convey the information of TDs in a generic way:
|
This is only true for the TD instances do not fulfill the JSON-LD 1.1. rules. TD instances that already have all the |
But when do you do validation then to make sure it is really a TD? This is part of this preprocessing and this is how node-wot does it. Also, what exactly are "JSON-LD 1.1. rules"? Even if the default value issue is solved through JSON-LD 1.1 Framing, you need to apply this Framing first, that is, do preprocessing. This you can only do based on metadata, that is, the Media Type. |
Links can either be a single value (an object with the |
Indeed that is a pity that we not want to point out via a media type such as |
Good point |
There is still a misunderstanding of how representation formats work and of Media Types, what they give you and how you use them... You do not need You still need to check if optional fields with default values are omitted. From Also you want the sender to guess how the receiver will want to process it and then set the Media Type accordingly? You always want to offer two links for content negotiation of the same content? You want JSON only parsers to reject TDs with " |
I would expect that I get a TD that follows the (JSON-LD based) specification of the TD also including the default values etc. In that case I would submit directly the TD to JSON-LD parser to retrieve TDs content. In the case of the generic |
But you just create a club that excludes raw JSON parsers although they could get all the information they need. Also on the Internet you should never fully trust what a sender tells you. You never know if he really included all default values. With the preprocessing we have something more robust. |
Imho the format must be parsable by plain JSON parsers. It is difficult to mandate all "consumers" to implement the JSON-LD specification, even though they may never be able to handle semantic annotations. |
No. JSON-LD is JSON based document that any JSON parser can handle it. In the past we followed this philosophy (such as in node-wot) and we pointed this out in the TD specification https://www.w3.org/TR/wot-thing-description/#parsing .
I know, however, there are also time critical scenarios out there where parties are trusted and a pre-processing step not necessary to save time and resources. |
Just to be clear. I just make the proposal to have maybe both |
Exactly. And because of exactly this I am so concerned and cannot understand your intentions. This is throwing away all the consolidation work we have done between the JSON TD proposal and the previous WG draft to not counter IoT fragmentation with two separate TD solutions... |
@sebastiankb are you intentionally making these I also generally agree with @mkovatsc and think that if there are time/resource concerns then maybe optimizing the pre-processing requirements would be a better approach? |
i had a chat with matthias and we agreed to stick with the single media type approach for now. I updated section 6 based on today's discussions. https://w3c.github.io/wot-thing-description/#TD-serialization-section Any feedback is welcome :-) |
The new updated TD version includes almost all suggestions. Many thanks again for your feedback. |
Oracle review comments on simplified TD draft snapshot on 27.4.
The following comments apply on a preliminary snapshot of the Thing Description spec draft as of April 27th, 2018.
https://github.com/w3c/wot-thing-description/tree/TD-JSON-LD-1.1 spec draft.
They are not exhaustive and may not be applicable to a later version of the spec.
1. Introduction
3. Namespaces
4. Conformance
5. Information Model
The order of the keywords in the following sections should be changed to better reflect the conceptual structure.
5.1 Overview
This section talks about a vocabulary, whereas section 6 talks about classes. There term "vocabulary" is a bit vague, I recommend to use "classes" containing "fields" and just talk about vocabulary in the context of RDF.
5.2.1 Thing
The thing description should contain a set of additional metadata keywords to determine the manufacturer, model number, serial number, version, creation date, last modified date, ... of the TD. This allows to distinguish between different TD versions and device versions.
5.2.2 Property
5.2.3 Actions
Is there a way to cancel an action? How does a client query the status?
5.2.4 Event
5.2.5 Form
5.2.6 Link
See above: it would be useful to understand the motivation for the links between things. What is the application scenario? what are the semantics of a link? They are not used by any other keyword.
typo: "oeration"
5.2.7 Security
-- not reviewed --
6 Thing Description Serializations
Which of the two formats (JSON/ JSON-LD) is the default?
Which format is normatively required?
6.1 JSON
6.1.1 Thing as a whole
6.1.2 properties
6.1.3 actions
The type of the field forms MUST be serialized as a JSON array." - the second sentence already gives the normative requirement, the first one can be removed.
6.1.4 events
6.1.5 forms
-- not reviewed --
6.2 JSON-LD 1.1
-- not reviewed --
The text was updated successfully, but these errors were encountered: