-
Notifications
You must be signed in to change notification settings - Fork 28
Definition of ExposedThing.register()/.unregister() #75
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
Comments
All of these are possible. The algorithms are not specified yet. IMHO it is up to the developer when to call Without registering, a Thing may be discoverable locally, if we decide to specify that way. But who would be the entity doing the discovery? Things in another WoT runtime and another connection would need to go through the WoT interface. Things in the same runtime could possibly make a discovery request with "local" option, based on a runtime-wide local directory. If so, we should specify that in the algorithm. I have to think what the How that TD is generated is probably subject to a separate algorithm. I agree on that. |
The entity doing the discovery is always a WoT Client using For WoT Clients in another WoT Runtime, register() must have been called, with or without URL to discover the ExposedThing. Multicast discovery is only one implementation of network discovery (for which We might want to review the DiscoveryMethod enum at some point... |
Looks like we agree. |
Noting down an idea. What about: let thing = WoT.produce(myTemplate)
.addProperty(pInit)
.addAction(aInit)
.setActionHandler(aHandler)
.expose(); where This would also solve the |
Yes, this looks good. Too bad chaining is not supported in the current API (all functions are |
This is something we should still fix, as this was possible in the previous version and there is no reason not to support it. |
I will do that (re-add chaining support) now, as it's a trivial change. @danielpeintner, @knimura, is that OK? |
Yes, fine. We can discuss later if necessary because looks it is a matter of preference. |
Chaining was fixed in the last WD release. Left open is the clear definition of exposing a Thing from the Scripting API. I still recommend the |
Should be fixed by #113. |
#70 opened the discussion on how the actual meaning of the
register()
andstart()
functions.register()
, when called with a URL of a Thing Directory, helps to make Things public. This is definitely useful. The part about "a TD is generated" is too narrow; I guess discoverability is the right discussion here.Without calling
register()
, the Thing would be hidden and not discoverable at all? Would it be discoverable locally (within the same Servient), but not externally (e.g., on a Servient index page or network discovery)?register()
, when called without URL, could then mean making it discoverable outside the Servient (e.g., listing it in its index or including it in the Servient's network discovery mechanisms such as CoAP multicast).Is there a dependency on
start()
andstop()
? Must an ExposedThing be started before registering it? Would make sense. Couldregister()
automatically callstart()
if not started yet? (Less possible errors)Any thoughts?
The text was updated successfully, but these errors were encountered: