-
Notifications
You must be signed in to change notification settings - Fork 17
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
Multiple Responses from Peer-to-Peer Discovery #249
Comments
Discussion:
|
I'm leaning towards:
|
I was under the impression that this use case was already solved by the text in section 5.2:
In other words, if a given origin hosts multiple Thing Descriptions and uses the Well-Known URI introduction mechanism then it should host a Directory Description at This is consistent with all of the other introduction mechanisms which can advertise ether a Thing Description or a Directory Description. This came up in w3c/wot-profile#121 because I concluded that if we made the Well-Known URI discovery mechanism mandatory in the Core Profile then it would effectively also make support for the Directory Service API mandatory since the URI could resolve to a Directory Description as well as a Thing Description. I don't imagine that's an intended side-effect, but since a host can only have one well-known URI, the only alternative seems to be to invent another mechanism for listing Thing Descriptions specifically for that feature. Note that if read-only directories were allowed (see #208) and the only mandatory interaction affordance was the things property, then a Directory Description could actually be pretty simple. Edit: Having the Well-Known URI resolve to a Thing Description (or Thing Link) which provides links to other Thing Descriptions using an |
DNS Service will not need to return multiple TDs. This is just a use case for well-known (see #208 (comment)) because it doesn't allow adding base path. Multiple TDs can be registered as separate DNS SD services, with their own base path ( Summarizing discussed solutions to address the well-known URL limitation:
Another option that comes to my mind is to return array of URLs:
Response is an array of links relative to well-known URL:
Note that well-known doesn't prevent additional path components:
|
Let's follow up on issue #208 which can resolve this is .well-known returns a small static directory that only implements "listing". But we have to clearly indicate that "listing" is the ONLY mandatory affordance required, and that requires a bit of restructuring. |
So, I think this may be resolved now, technically, by having such endpoints return a (single) TD for a small, read-only directory, and our improvements to allow "listing" to be the only mandatory affordances in TDDs. But we MAY need to add some informative text somewhere to explain that this is what should be done in this case. Going to "Propose Closing". |
It was noted that when "guessing" the URL to access TDs from self-describing Things given just the IP address that we have to deal with the case of endpoints that host multiple Things, like a gateway (which could have several services acting as Things, including proxies) or even endpoint with multiple sub-devices (e.g. a geolocator, a temp sensor, a humidity sensor, etc all in one device).
Proposed: the return value at .well-known can be an array of TDs. If this proposal makes sense, we should also discuss whether it should always be an array (e.g. should square brackets always be used even if there is just one element) or if the array notation is only necessary if there are multiple TDs. We could also discuss making this consistent with the TDD listing API, whether we need pagination (might be useful for gateways with a bunch of services, including, for instance, proxies for all devices on the LAN), etc. This aligns with my initial thought of making .well-known a special case of a TDD.
Assumption: authentication determines the identity of the requestor and whether they have access to any of the things or a subset. Only the subset they have the right to view should be returned. If the array would have been empty (no rights to view anything) then an Unauthorized error should be returned rather than an empty array.
The text was updated successfully, but these errors were encountered: