Re: Server Sent Events vs Web Sockets?
This is a reply to an old message (http://lists.w3.org/Archives/Public/public-webapps/2010AprJun/0087.html) and I don't know if this goes to the right thread. Would Server Sent Events be more or less efficient that Web Sockets? Does one of these use less resources than the other? Or, are the (more or less) the same at the lower level? Thanks, Ilkka
Re: Server Sent Events vs Web Sockets?
On Tue, 13 Apr 2010, Dominique Hazael-Massieux wrote: Le lundi 12 avril 2010 à 17:47 +, 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). Do you have any suggestion as to how to do that? I don't really see why the Web Sockets section would mention the Server-sent events section, and vice versa; they seem like unrelated technologies. I mean, they're as related to each other as they are to form submission or XMLHttpRequest, but those aren't mentioned either. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: Server Sent Events vs Web Sockets?
Le lundi 12 avril 2010 à 17:47 +, 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
Re: Server Sent Events vs Web Sockets?
Hi, Dominique Hazael-Massieux wrote on 12/04/2010 17:58: Hi, Given the overlap I perceive between Server Sent Events and the Web Sockets spec, I would be interested to know what role Server Sent Events fills that Web Sockets doesn't. A remarkable (and IMHO probably most interesting) difference being the push-registry type of mechanism that Server Events offers (http://dev.w3.org/html5/eventsource/#eventsource-push). If a similar (or more generic) push mechanism would be included for Web Sockets, then I may go along with you :-) I understand that Server Sent Events allow for unidirectional communication with the server, while Web sockets is bidirectional, and SSE is purely HTTP-based, while Web sockets is made to switch to a lower level protocol, but this all points to SSE being a subset (feature-wise) of Web sockets. Is it only a question of timing? i.e. SSE filling the role of Web Sockets while Web Sockets is being finalized? 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. Thanks, Dom -jy -- Jean-Yves Bitterlich, Senior Staff Engineer -- Sitz der Gesellschaft: Sun Microsystems GmbH Sonnenallee 1, D-85551 Kirchheim-Heimstetten, Germany Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Juergen Kunz
Re: Server Sent Events vs Web Sockets?
On Mon, 12 Apr 2010, Dominique Hazael-Massieux wrote: Given the overlap I perceive between Server Sent Events and the Web Sockets spec, I would be interested to know what role Server Sent Events fills that Web Sockets doesn't. 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. 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. Server Sent Events is likely to end up used as the basis for automated data push mechanisms (e.g. updating Web Storage or appcache stores). These differences mean that there will likely be a reason for both to exist for a long time. 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 -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'