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

[Scripting] Discovery of exposed Things on the same runtime #233

Closed
h0ru5 opened this issue Sep 22, 2016 · 3 comments
Closed

[Scripting] Discovery of exposed Things on the same runtime #233

h0ru5 opened this issue Sep 22, 2016 · 3 comments
Labels
moved issue is moved to a task force's repository Scripting

Comments

@h0ru5
Copy link
Contributor

h0ru5 commented Sep 22, 2016

referring to
https://github.com/w3c/wot/blob/master/meeting-results/beijing-f2f/wot-f2f-beijing-scripting-api.md#localdiscovery

A factory method needs to be added to the WoT object to enable discovering exposed things on the same runtime in order to interact with them using server-side API

@zolkis
Copy link
Contributor

zolkis commented Nov 16, 2016

Alternatively, going by the wording you have used, should we have a formal abstraction for "runtime" in WoT? Also, specify what is the relationship between Thing and runtime? Runtime contains multiple Things?

I ask because for similar reasons OCF uses the notion of "Device" (corresponding to a "runtime") and "Resource" (corresponding to a Thing). Resources are addressed by specifying a device id (that uniquely maps to a network address) and a resource id or path (that uniquely maps a resource within that device). When device id is not specified, requests are relevant to the same runtime.

Also, OCF mandates that every device implements a resource for supporting resource discovery. When you retrieve that resource, it lists all resources supported by that device.

I wonder if we need to introduce similar concepts in WoT, or otherwise how do we formally describe this.

If Thing is the only addressable entity in WoT, and runtime is a non-exposed abstraction, we may be able to get away with specifying a "local" parameter to the discovery function. But then every Thing implementation needs to replicate all infrastructure needed for discovery within a runtime. In that case we don't have a problem, local and remote discovery use the same mechanism.

@zolkis
Copy link
Contributor

zolkis commented Nov 17, 2016

Actually there is a requirement to support GET on the Thing externally addressable root URL and provide a TD.

So is it correct to we assume a script running in the Thing is able to access the same information (i.e. no separate mechanism needed)?

@egekorkan
Copy link
Contributor

Closing, the discussion should continue in w3c/wot-scripting-api#227

@egekorkan egekorkan added moved issue is moved to a task force's repository and removed Current-Practise enhancement labels Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moved issue is moved to a task force's repository Scripting
Projects
None yet
Development

No branches or pull requests

3 participants