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

Re: Thing descriptions for Server Sent Events?

From: Dave Raggett <dsr@w3.org>
Date: Tue, 15 Nov 2016 16:34:41 +0000
Message-Id: <FF081479-C809-492A-9C35-2D79A76DCFE8@w3.org>
To: public-wot-ig <public-wot-ig@w3.org>

> On 15 Nov 2016, at 15:59, Dave Raggett <dsr@w3.org> wrote:
> 
> 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.

Note that Server Sent Events supports the “id” field in the event along with the lastEventId property for the event object. The browser automatically includes a Last-Event_Id header with its next request, enabling the server to do its best to provide the messages that were missed when the connection broke. The thing description could perhaps provide an indication of support for lost messages and how far back the record goes.

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




Received on Tuesday, 15 November 2016 16:34:54 UTC

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