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] Framework-Events to be added #238

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

[Scripting] Framework-Events to be added #238

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

Comments

@h0ru5
Copy link
Contributor

h0ru5 commented Sep 22, 2016

According to https://github.com/w3c/wot/blob/master/meeting-results/beijing-f2f/wot-f2f-beijing-scripting-api.md#relationship-between-exposedthing-and-wot-api we decided to add an event source for runtime changes to a Thing's interface structure, such as adding or removing actions and properties.

Also, a runtime could drive a state machine (e.g. defined in statechart-xml) and allow scripts to add handlers to the state transition events as discussed in https://github.com/w3c/wot/blob/master/meeting-results/beijing-f2f/wot-f2f-beijing-scripting-api.md#support-behaviour-definition-by-event-driven-state-machines

@zolkis
Copy link
Contributor

zolkis commented Nov 7, 2016

Events could be used in client API. However, in the server API, one request should have exactly one handler, therefore constructs like EventTarget and EventEmitter are not suitable. In the server API IMHO we need to have simple handlers (callbacks) at the serving leaves, i.e. ExposedThings.

But we could have events for non-request type of things (hardware notifications, etc).

@h0ru5
Copy link
Contributor Author

h0ru5 commented Nov 11, 2016

The question at hand here was in the lines of: "when àddAction is called on the server, how will the client know?", so defining events to be received on the client side (ConsumedThing) could be sufficient.

@egekorkan
Copy link
Contributor

Not relevant anymore, propose closing. Scripting API handles this

@zolkis
Copy link
Contributor

zolkis commented Jun 15, 2020

IMHO changing TDs should be done like API changes: new TD (version) out, old one deprecated after a while. Both new and old can be used in the same time in clients, considered as different client endpoints.

Basically we need a mechanism to deprecate old TD's, but I guess that is possible either in the device or in the Thing Directory. In both cases, this needs re-discovery.

@relu91
Copy link
Member

relu91 commented Jun 16, 2020

This issue seems related to what we are discussing for actions. See w3c/wot-thing-description#899.

@egekorkan
Copy link
Contributor

Discussion should continue in w3c/wot-thing-description#899 , closing.

@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

4 participants