-
Notifications
You must be signed in to change notification settings - Fork 28
ExposedThing
and DynamicThing
#14
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
If the difference is just a policy for updating the TD, it could be exposed as a policy property (provided during construction either implicitly by the runtime configuration or explicitly by the script). Then this policy could possibly be encapsulated by the runtime... |
so from the viewpoint of a script dev: the runtime would always offer all methods but give an error if I try to change an "immutable" thing (e.g. an Right? |
Yes, that's the idea. |
Let me confirm:
|
Yes, that's my understanding. What we don't know yet is how exactly will we expose and handle policy information - but we can start with a string or dictionary property. |
Of course we could keep the names, e.g. Exposed Thing (not ExposedThing), but in the API we'd have one type of object. The rationale for this would be that
|
Related issue: w3c/wot#310 |
my suggestion would be to reflect this policy as a property This diverges from ECMAscript in the way that this is set for the whole Another option would be to have an attribute on Thing level to indicate if interactions can be added (e.g. |
In my understanding the As opposed, So in my view Is this reasoning correct, or what is the use case for fine grain limiting access to If the use case is that clients with certain privileges can only change certain set of properties/actions/events, then we'd need to attach to each property, action and event a descriptor if it is configurable for the given client -- which is a nightmare to configure when creating the IMHO that is technically very close to actually attempting to make the TD changes and then either failing or succeeding, but there is the difference that configuration happens by the permissions of the client (out of scope for Scripting), without the need to set explicit policies at the server side using Scripting, which IMHO is a huge simplification. However, if the use case is to set some capabilities that are valid regardless of the permissions of the client, then IMHO we should use a capability interface rather then a permission interface. In that case we'd need to expose a different interface than The capabilities supported by a Thing currently are encapsulated by the TD and are not exposed through the Scripting API. It would even make sense to discover Things based on capabilities (with an explicit API), but now it's encapsulated by an opaque dictionary for TD in the discovery filter. We could make that explicitly exposed in Scripting, but it would be quite complex. My argument is that it's not clear whether we really need that. I wonder what would remain of the So IMHO the proposed |
I think with PR #21 we can close this. Reopen if needed. |
despite the naming should be reconsidered, we have a general question to discuss about regarding the
ExposedThing
andDynamicThing
, where one has static interface during runtime, while the other is modifiable by methods likeaddProperty
orremoveAction
This issue is forked off from the discussion on #6 and also relates to the general contract between Things, Scripts and WoT Runtime as discussed in #2
The text was updated successfully, but these errors were encountered: