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

RD usage (endpoint vs. resource) #120

Closed
chrysn opened this issue Feb 16, 2021 · 3 comments
Closed

RD usage (endpoint vs. resource) #120

chrysn opened this issue Feb 16, 2021 · 3 comments

Comments

@chrysn
Copy link

chrysn commented Feb 16, 2021

The way a wot.thing and a wot.directory are registered at an RD (currently in https://w3c.github.io/wot-discovery/#introduction-core-rd) is at odds with how an RD is designed to accommodate multiple applications (including WoT) running on a single host.

Endpoints should primarily submit their resources (hence the name ;-) ), or at very least those that serve as entry points for further steps, as links to the RD to be looked up in resource lookup. I don't know the current WoT spec well enough to say whether a thing should only submit its one or multiple links to an RD, but either way they should be discoverable through resource lookup. The endpoint lookup interface (on which details like et=wot.thing would be visible) is intended more for administrative purposes, and should not be the go-to lookup method outside of cases that unconditionally need to inspect it on a per-registration level.

@k-toumura
Copy link
Contributor

Thank you for your helpful comments, @chrysn !

Yes, I think that we should use rt(resource type) instead of et(endpoint type) because endpoint is a web server of client, not a Thing Description.
In the case of WoT discovery, the purpose of introduction mechanism is to find a URI of Thing Description of Thing or Thing Directory (not directly discover properties/actions/events and other metadata). So, I'm assuming that each Thing (or Directory) exposes their Thing Description as a resource, and put links on /.well-known/core such like:

</url/of/a/self-hosting/td>;rt="wot.thing";ct=432

(432 is CoAP Content-Format ID of application/td+json)

Is it correct from the view of CoRE-RD architecture?
If so, I'll update Section 5.4 to use resource type instead of endpoint type.

@chrysn
Copy link
Author

chrysn commented Feb 17, 2021

Thans for your fast response – yes, that looks better.

Personally, I think that it'd also make sense to advertise some properties of the TD in the RD right away (sticking with the canonical example, that make a registration entry like the below) -- but that only makes sense if applications can use it to pre-filter responses.

When the coral-reef RD extension is ready (which, alas, is expected to happen only after wot-discovery is), some of the statements inside could be precisely converted to RD content and thus be queriable more precisely (like "give me devices that have toggle commands"); that should be a seamless extension by then.

By the way, please note that the Resource Type is managed by an IANA "Specification Required" registry, so at some point the wot-discovery document it may help to state that "IANA will be asked to allocate ...".

@mmccool
Copy link
Contributor

mmccool commented Feb 22, 2021

resolved by PR #121

@mmccool mmccool closed this as completed Feb 22, 2021
JKRhb added a commit to namib-project/RIOT that referenced this issue Sep 3, 2021
JKRhb added a commit to namib-project/RIOT that referenced this issue Sep 3, 2021
JKRhb added a commit to namib-project/RIOT that referenced this issue Sep 3, 2021
JKRhb added a commit to namib-project/RIOT that referenced this issue Sep 3, 2021
JKRhb added a commit to namib-project/RIOT that referenced this issue Sep 5, 2021
JKRhb added a commit to namib-project/RIOT that referenced this issue Sep 18, 2021
schulztr pushed a commit to schulztr/RIOT that referenced this issue Oct 20, 2021
JKRhb added a commit to namib-project/RIOT that referenced this issue Mar 19, 2022
JKRhb added a commit to namib-project/RIOT that referenced this issue Oct 26, 2022
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

No branches or pull requests

3 participants