-
Notifications
You must be signed in to change notification settings - Fork 28
Definition of ExposedThing.start()/.stop() #76
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
Yes, but #75 is about the semantics of (un)register(). So do you agree with my sketch for I want to see here a rough algorithm definition to be sure we all agree on the two functions |
They are trivial. Start handling requests and stop handling requests. That's it. |
Then how is the behavior when I call Do I need to stop it first for editing? |
It is an implementation problem. On most implementations one could add a property without disturbing current functionality, but the TD needs re-registering. IMO it should be left to the script how to define this. The implementations should just ensure transactional integrity. |
But you have not even an error mechanism defined in case the implementation does not allow it. Thus, this must be covered by the Scripting API to get deterministic behavior in different runtimes. If re-registering is needed, register() now has a different meaning again: it is not enabling discoverability as discussed in #75, but again has this touch of writing the TD to a file. I thought for this you want to define the "algorithms" behind the functions? |
Yes, the algorithms should specify all of that. About register,
So if the TD is changed, it should be updated everywhere it was registered, but this is the responsibility of the solution (application script), as well as invoking |
Why is it now discoverable on multicast discovery? I guess you forgot the case where register() is called without URL. And also registration updates (see CoRE Resource Directory which defines the basic interfaces of the Thing Directory) can be handled without a call from the script. |
Right. It's only locally discoverable without registering. However, I see very limited use case for that. A script that defines an ExposedThing has not many reasons to discover it locally. And we have not defined yet how multiple scripts should be run in the same runtime. If it's single tenant runtime, and the Thing to be discovered is part of the same solution, the solution doesn't need local discovery to know what Things it has defined. Multi-tenant runtimes are debated in security TF. How one solution should be dependent on another solutions Things that are not registered, but assumed to be run in the same WoT runtime... it is beyond my imagination why someone would rely on such a scenario. |
Well, I tried to make sense of the |
The no use case is for invoking |
The current ED still does not answer why In the discussion of the Prague target, we discussed that changes on the Can we drop |
No, it remains open and will be handled when algorithms are specified. |
The reason they are separate is they are doing different things:
|
So for Prague, do users of the API need to call What are the use cases for temporarily stopping request handling, given that we have atomic transactions for changing the Thing? |
We have not defined the algorithm yet, but yes, that is the idea: Stopping a Thing might be desired when TD changes are applied to it. It should be up to the application script to decide when. |
Obsoleted by #113. |
#70 opened a discussion including
start()
andstop()
.I guess we all agree that
start()
andstop()
are required to avoid serving "unfinished" Things. Still, please +1 or comment this.The only aspect to clarify would then be its relation to
register()
.The text was updated successfully, but these errors were encountered: