W3C home > Mailing lists > Public > public-wot-ig@w3.org > November 2016

Thing descriptions for Server Sent Events?

From: Dave Raggett <dsr@w3.org>
Date: Tue, 15 Nov 2016 15:59:39 +0000
Message-Id: <22AE319F-813D-4862-A466-8D3B86E60E5A@w3.org>
To: public-wot-ig <public-wot-ig@w3.org>
Has anyone looked at the thing description requirements for protocol binding via Server Sent Events, which are supported by most modern Web browsers? The protocol layers on top of HTTP and keeping the HTTP connection open, allowing the server to push a sequence of messages to the client. If the connection dies, the client automatically reconnects. It is common to use JSON for representing the messages, provided you steer clear of new lines which have a special significance to the HTML EventSource objects that browsers provide for handing messages. Server Sent Events can be considered as an alternative to Web Sockets. Some form of time stamp (e.g. milliseconds since epoch) would allow a client to request a history of messages that were missed when the Event stream connection was dead.

I am exploring server side simulation of physical processes, using Server Sent Events to stream updates to the browser for rendering with Canvas2D and requestAnimationFrame. This is much easier than setting up real physical systems, and will enable me to explore a comprehensive range of ideas for thing descriptions and associated APIs. I will use an IFRAME element for visualising the physics simulation, where the enclosing web page provides the user experience for interacting with things via their thing descriptions. The IFRAME is thus analogous to the view of a physical system streamed from a webcam.

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

Received on Tuesday, 15 November 2016 15:59:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:27:08 UTC