w3c / wot-binding-templates

Web of Things (WoT) Binding Templates
http://w3c.github.io/wot-binding-templates/
Other
22 stars 25 forks source link

Default eventing mechanism in HTTP #199

Open egekorkan opened 1 year ago

egekorkan commented 1 year ago

Currently, if there is an event affordance or an observable property, there has to be a subprotocol in place in order to do real eventing, e.g. sse, longpoll etc. However, we do not mandate this and I think we should. If there is no subprotocol, different implementations will do different default assumptions (see https://github.com/eclipse/thingweb.node-wot/issues/863).

Two important questions for everyone:

  1. Should there be a default subprotocol in HTTP forms with eventing mechanism (events and observeproperty)? If there should be, what mechanism should it be?
  2. If there is no subprotocol field, should a validation of the TD fail? We can provide the JSON Schemas that allow this validation to be happen on top of the basic schema for TDs. Furthermore, should we restrict the values of subprotocol in the case of an HTTP form?
egekorkan commented 1 year ago

Sort of duplicate of #114 but I would prefer to move the discussion here since the only decision in that issue discussion was to add a possible mappings table in each protocol binding template.

danielpeintner commented 8 months ago

@egekorkan do you have a use-case for proposing a default eventing mechanism in HTTP or is the rational mainly to avoid issues and increase interoperability?

egekorkan commented 8 months ago

No this is definitely not a use case requiring discussion but more about alignment. If there is no default or mandatory subprotocol field, that form should be invalid.