Comments (4)
The various bindings seem to reject update methods to the root resource of each thing where these fields are defined
I assume you try to change the TD from the outside via a request to the TD resource on the Servient. This behavior is not intended. To modify a Thing, you must own it, that is, have access to the runtime sandbox which originally exposed the Thing.
Straight-forward, this means you can only do this from within the script that you run. You can add Actions to the Thing that allow an update via requests from the outside, yet this is custom behavior to be implemented by you.
whether there is a prescribed way to represent other discrete data about the thing.
Any metadata can go into the TD. Exposed Things now behave like simple JavaScript objects and you can assign any value where you want, like the thing["support"] = "none";
thing["manufacturer"] = "ACME Corp.";
thing["serial"] = "4 8 15 16 23 42";
However, for this to fully work, there needs to be a context that defines the terms manufacturer
, serial
, etc. We are collecting terms that should go into the core vocabulary, so that no additional context is required for common terms. Also see w3c/wot-thing-description#142
from node-wot.
OK, great. I appreciate the link to that issue. That's very much what I was looking for with that part.
On the subject of changing things after the server is running, would the idea be to make your modifications (either to the name, set of properties, etc) and then recall its expose() method? This seemed to work fairly well, but it required changing my ProtocolServer.expose() implementation to check whether it existed already (otherwise it would duplicate the endpoints instead of updating). I didn't see anything similar in the other server implementations, though, so I thought there might be a better way.
from node-wot.
Originally, we did not require any specific function call and updates to Things became available instantly. Recently, I refactored to make use of expose()
, in particular, for special bridge bindings (binding-oracle, binding-fujitsu) that require some form of handshake to make Things available.
We are still collecting implementation experience how the behavior on updates should be. My assumption at the moment is that any extension and non-breaking change can be done at any time; Changes that break the API, however, should actually result in exposing a new Thing.
Can you provide some feedback if re-exposing the same Thing to apply changes should be made mandatory or any other feedback on the lifecycle?
from node-wot.
No further feedback/comment.
from node-wot.
Related Issues (20)
- BUG: Error when exposing a Thing because "structuredClone" is not defined HOT 4
- Failing Thing Model Helper HOT 2
- [td-tools] - 'webpack' is not recognized as an internal or external command HOT 1
- Client stops observing properties after a while HOT 8
- Optional Disabling of the schema validation
- Upgrading to ES2021 HOT 2
- allowSelfSigned not working for requestThingDescription HOT 4
- findProtocol SHOULD NOT require base HOT 4
- CI - Add Node.js 22 to CI tests
- CoAP issue on local machine (Windows) - nO HOT 2
- Async actions should not try to validate the value according DataSchema
- action and event affordance do not raise error when data schema does not match HOT 1
- events without subprotocol might be causing unexpected behaviour HOT 3
- Export WoT implementation type
- Modbus Test issue with modv:function HOT 1
- Issue with void-obj of Test Thing HOT 1
- Follow-up on validating output for (async) actions
- Re-creating package-lock.json fails HOT 4
- observe property deserialized value (may) not (be) completely consistent HOT 3
- Deleting tm-helpers from node-wot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-wot.