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
Anonymous TDs in a directory #149
Comments
For the HTTP API:
|
I think that the comments of the privacy group (PING) regarding having mandatory id in the previous versions of the TD would be applied here as well if an id is inserted by the system. Once a TD is in the directory and has an id, it will be probably always consumed with the version from the directory no? |
I nearly filed an issue about this a few weeks ago because I noticed the Directory Service API needs an ID to fetch a Thing Description, but Then I noticed that the specification said the directory would provide a system-generated ID for "anonymous" Thing Descriptions, so that shouldn't be a problem (I assumed those IDs would also be provided as an Note that this does mean the Thing Description exposed by the directory wouldn't be exactly the same as the Thing Description provided by the client (as it would have an additional FWIW, the way WebThings Gateway solves this problem is to add a
As an aside, the way I originally assumed directories would work was that web things would be added to the directory by URL (the URL at which their Thing Description is hosted), which could therefore always be used as a globally unique URI. In the current design things are registered with a directory using an entire Thing Description (with no reference to the URL at which that resource may have originally been served), which is then served as a new web resource by the directory at a new URL, effectively creating a new web thing. In this design it's necessary for the directory to generate IDs for Thing Descriptions which don't provide them, since they are needed for generating those new URLs. |
@egekorkan I couldn't understand. Would you elaborate more on this? @benfrancis I also do agree that setting |
@farshidtz I am guessing you are asking about the bold part. So the thing is that the TDs are sent to the directory and after that, the directory would be mainly used to fetch and then consume the TDs. Thus, a TD Consumer would only see TDs with |
Sorry for joining late, let me share my thoughts. The TDs are JSON-LD framed documents. If they have an attribute Therefore, adding an additional field that is not
The former is translated into the following RDF:
It can be observed how the Instead, the latter TD is translated as follows:
It can be observed that the subject of the TD, and therefore the URL that identifies it, this time is a blank node. The blank node is assigned by the translator itself. This mechanism is intrinsic to JSON-LD framed, but also, to regular JSON-LD; and this is totally correct. Now, if we add a new attribute in the latter JSON-LD framed like "new_indetifier" with the value "urn:dev:ops:32473-WoTLamp-1234", the TD is translated into the following:
As it can be observed, the identifier is just another attribute, which is not identifying this resource in RDF since such task is done by the subject which is still a blank node. This problem gets worse if this new field is located in a nested object under the key
This TD, which in theory is an anon TD identified by
As you can see, now the Therefore, in order to be consistent with the RDF translation. It seems more suitable to always use |
An important point regarding identification in RDF:
There is a common distinction on the Semantic Web between 'semantic resources' (the Thing itself, here) and 'informational resources', which are Web pages describing semantic resources (the TD document). See e.g. 'Distinguishing between Representations and Descriptions' from some W3C note. Schema.org makes this distinction by declaring a property What this distinction implies is the fact that 'anonymous TDs' are different from 'anonymous Things'. A TD is never anonymous because it must be identified by a dereferenceable URL. A Thing, however, may be identified in many different ways and wherever there is ambiguity or privacy concerns, its In a Thing Directory, every TD must have a URL, for management purposes. I suggest to use this URL to unambiguously list TDs when searching on a Thing Directory. For instance, the output of search or listing could be: [
{
"@context": "https://www.w3.org/2019/wot/td/v1",
"schema:mainEntityOfPage": "https://example.org/thing-directory/td/id01234",
"properties" : {}
},
{
"@context": "https://www.w3.org/2019/wot/td/v1",
"schema:mainEntityOfPage": "https://example.org/thing-directory/td/id56789",
"properties" : {}
}
] The returned TDs are identified as |
E.g. the following known TD: {
"title": "Known TD",
"id": "urn:dev:ops:32473-WoTLamp-1234",
...
} Can be accessed at And an anonymous TD: {
"title": "Anonymous TD",
...
} Can be accessed at If we add selfLinks to TDs, the list will look like: [
{
"title": "Known TD",
"id": "urn:dev:ops:32473-WoTLamp-1234",
"selfLink": "https://tdd.example.com/td/urn:dev:ops:32473-WoTLamp-1234",
...
},
{
"title": "Anonymous TD",
"selfLink": "https://tdd.example.com/td/urn:uuid:61079229-83ae-444a-9199-e9a98cda62b0",
...
}
] This is similar to the use of Adding selfLink:
|
This looks good to me |
The property In short, I find your example satisfactory up to the name of the property: I would be happier with something like |
Observations:
My preferred solution is (still) to simply assign a local ID (only for that directory) for ALL TDs. Proposal:
Does that work for everyone? |
I think mandating this leads to redundant "unique" identifiers which makes deployments hard to manage. IMO, enforcing local system-generated IDs has the following issues:
My proposal is to try to "continue" following REST principles:
I think the following addition to the spec is important:
|
Consider this resolved now. |
Anonymous TD are those which don't have an
id
field.Should the directory accept them? If yes, how should they be maintained and exposed anonymously?
The text was updated successfully, but these errors were encountered: