Re: Server Sent Events vs Web Sockets?

Le lundi 12 avril 2010 à 17:47 +0000, Ian Hickson a écrit :
> Server sent events doesn't require any change to the network, it's 
> compatible with almost any setup that uses HTTP today. Web Sockets 
> requires that intermediaries support full-duplex connections. Server sent 
> events is compatible with today's HTTP servers. Web Sockets requires new 
> Web Socket servers.

OK — in other words, Server Sent Events should be easier to deploy.

>  Server Sent Events has a variety of features that Web 
> Sockets lacks by design, such as reconnection, event IDs, and the ability 
> to send arbitrary events.

So, Server Sent Events adds to Web Sockets a specific protocol for
dealing with events, a useful pattern to optimize. 

> These differences mean that there will likely be a reason for both to 
> exist for a long time.

Yeah, I didn't mean to question that; I'm just trying to see the full
picture.

> > Currently, the two documents don't reference each other at all; some 
> > clarification of their relationship in the specs themselves would be 
> > useful, I think.
> 
> They're part of the same document:
>    http://www.whatwg.org/specs/web-apps/current-work/complete.html#comms

Whether you consider them as sections or documents, I think it would
still be useful to document (however briefly) their interrelationship
(as you just did).

Thanks!

Dom

Received on Tuesday, 13 April 2010 07:59:14 UTC