node-wot icon indicating copy to clipboard operation
node-wot copied to clipboard

[discussion] Hosting Static Files

Open egekorkan opened this issue 1 year ago • 3 comments

In the links section of the exposed TD, we can manually write the URLs of documents hosted somewhere. However, node-wot is not capable of hosting these on its own. This means that we need to separately host and manage some documents that are actually closely linked to the Thing. The examples I have:

  • TM that is used (see note 1 below).
  • A simple HTML interface
  • Some documentation, specs of the device
  • More behavior description of the device, like a state machine etc.
  • Some logos etc

These are not property affordances semantically so putting them under properties is not a question (for me).

The reason I have put the discussion prefix is to see if there are actually more who think that this would be helpful. @FadySalama had triggered the discussion so there are at least 2 people interested.

Note 1: In the case of linked TMs, we would even need to host all the linked TMs that are linked in the TM linked in the TD. Thus, it might make more sense to do this in a generic fashion and mandate that all such static resources should be put under a specific directory and node-wot just serves them.

Note 2: The protocol to use is probably important. HTTP makes sense here since an HTML/Web interface should be served over HTTP. The biggest question is what happens when we only have a CoAP or MQTT binding in the servient. Should we not host those static files at all or push an HTTP binding into the servient? I think the first one makes more sense and a warning can be displayed when the HTTP binding is not included.

egekorkan avatar Jun 12 '23 08:06 egekorkan