Re: Thing descriptions for Server Sent Events?

Hi Dave,

What's the advantage over WebSockets though? EventSource is unsupported 
by IE/Edge (see http://caniuse.com/#search=eventsource) while all 
browsers support WebSockets.

On 11/15/2016 07:59 AM, Dave Raggett 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.
>
> 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>>
>
>
>


-- 
Fabrice Desré
Connected Devices
Mozilla Corporation

Received on Tuesday, 15 November 2016 16:36:11 UTC