WebThingsIO / api

Web Thing API Specification
http://iot.mozilla.org/wot/
Other
164 stars 24 forks source link

Multiple property updates in a single message #109

Open benfrancis opened 6 years ago

benfrancis commented 6 years ago

As a developer I would like to stream property updates with multiple updates batched per message so I don't have to send a separate message for every change

Suggested by @draggett, particularly for industrial use cases.

benfrancis commented 6 years ago

My first question would be whether the overhead of a WebSocket message is big enough to mean that sending a message per update is not practical?

draggett commented 6 years ago

We should try some experiments to measure the impact. These could look at batching vs individual events, and the effects of compresssion algorithms. We should cover examples where each update includes data from multiple sensors, as is common for telemetry use cases.

mrstegeman commented 4 years ago

This is actually being done already in our webthing-arduino library.

benfrancis commented 4 years ago

@mrstegeman wrote:

This is actually being done already in our webthing-arduino library.

Is that updating multiple properties in a single message (which the specification already describes), or sending multiple updates of the same property in a single message (which is what I think this issue is about)?

mrstegeman commented 4 years ago

It's sending multiple property statuses in a single propertyStatus message.