Open sebastiankb opened 4 years ago
Proposal:
A Data Schema based forwarding would be problematic when the Data Schemas are the same for multiple events. It is sadly quite common that people do not describe the payload detailed enough and simply say "type":"string"
for all of them...
I think for anything over WebSocket, there has to be a subprotocol where the event data is always encapsulated with the interaction name and the type of the data, like event-data
, event-unsubscription-output
, action-output
etc.
We should look on some real-world examples. @sebastiankb , @wiresio could you provide something?
One real-world example is the Mozilla WebThing Websocket API: https://iot.mozilla.org/wot/#web-thing-websocket-api
This problem is a placeholder that takes care of multiplexing with WebSockets.
So far node-wot consumer cannot distinguish between different events via WebSocket.