W3C home > Mailing lists > Public > public-wot-ig@w3.org > June 2015

data streams

From: Dave Raggett <dsr@w3.org>
Date: Wed, 3 Jun 2015 08:16:37 +0100
Message-Id: <AB41E0F6-E27E-4998-9A9D-2727892755F4@w3.org>
To: Public Web of Things IG <public-wot-ig@w3.org>
I am interested in enabling the Web of Things Framework to handle data streams.

Some sensors produces streams of data as a function of time. Data streams can carry one or more data channels where each channel is a single number or a vector.

An example would be an electrocardiography (ECG) sensor which is used to produce a waveform of the heart's activity over a time period of up to a few seconds (see attached image). In a hospital the sensor and display are connected together with electrical leads.

In the Web of Things, the sensor and the display are both modelled as "things". In place of leads, we set the sensor's output property to the display. The display could be an object in a web page script that displays the waveform using the HTML CANVAS element, or it could be a remote service, e.g. a device that acts as an oscilloscope. The display could have properties that control its behaviour, e.g. how many seconds of data to show. It could also have actions, e.g. to freeze the display to allow a waveform to be studied in more detail.

Script developers ony need to know the object model for the sensor and display. The details of the underlying protocols are dealt with automatically by the server platform. For this to work, we need a standard way to describe data streams as part of the data model for "things".

For a simple thing property, e.g. the state of a light switch, setting the value of the property on the proxy results in the server sending a message to update the physical state of the switch. For streams, the semantics is slightly different. Setting the value of the proxy's' output directs the data stream to the designated object.

This model assumes that a stream can only be sent to a single data sink.  If you want to have multiple sinks, you will need to use a "thing" that acts as splitter. In principle, the thing acting as the sensor could do this, e.g. providing one output for a data logger, and another for a display.

p.s. I am planning on implementing this as part of the NodeJS server project on GitHub. By the way, there are several examples of how to create an ECG monitor with Arduino’s if you want to build your own.

   Dave Raggett <dsr@w3.org <mailto:dsr@w3.org>>

(image/jpeg attachment: ecg.jpg)

Received on Wednesday, 3 June 2015 07:16:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:26:35 UTC