Re: Value of Server-Sent Events

On Fri, 23 Oct 2009, Michael Nordman wrote:
> 
> An area that may be worth exploring, that would add to the list things 
> that go beyond syntactic sugar, could be for multiple documents to 
> listen in on the same event-stream backed by the same connection to the 
> server. This could reduce the total number of hanging GET style 
> connections used by an application (spread across multiple pages / 
> workers) on a particular client, and by extension the number of 
> connections seen by the server-side.

The spec technically allows this already, though as written it requires 
sending all the same messages again, so it's not really practical (and 
loses the "don't have to hang on to everything" advantage). It's not clear 
to me how we would know which messages are skippable -- maybe in v2 we can 
add a flag that indicates that this message block should be remembered, 
and another flag to indicate that all previous remembered messages should 
be dropped, or something like that, and when a new page hooks in, if the 
event source supports it, it would just get the saved messages and then 
resume with whatever the next message is.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 24 October 2009 03:32:11 UTC