w3c / w3c/wot-scripting-api

Discuss the modularization of WoT scripts

Open
#192 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

for next iteration priority: low Runtime Script Management use case
Dominant language
HTML
Stars
45
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Many WoT scripts on the client side are likely to be reusable across applications, in a similar fashion to Node-RED modules. For instance, control loop between sensors and actuators (temperature sensor vs. thermostat, brightness sensor vs. light switch, flow sensor vs. pump, etc.) could be implemented generically and instantiated for specific Things.

Standardizing a module mechanism for WoT would seem redundant with e.g. ES6 Modules. However, a way to annotate scripts with safety conditions may be an interesting feature. Safety conditions could be TD templates (e.g. expressed as JSON-LD frames), to constrain TDs to be consumed by the script. If consumed TDs do not match the template, an error could be thrown.

See also my position statement at the 2019 WoT workshop.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or entry points are identified. Start by reviewing the proposed reuse of ES6 Modules and the linked JSON-LD framing specification, then assess how safety conditions could constrain consumed Thing Descriptions. Done would require an agreed modularization and safety-condition design.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.