Server-sent Events and HTTP connection limits

The Server-sent Events specification currently states in section 8. Notes:

"Implementations that support HTTP's per-server connection limitation
might run into trouble when opening multiple pages from a site if each
page has an EventSource to the same domain. Authors can avoid this
using the relatively complex mechanism of using unique domain names
per connection, or by allowing the user to enable or disable the
EventSource  functionality on a per-page basis."

There are some problems with the proposed workarounds:
  o Even using separate hostnames can cause a problem if the same site
is opened in multiple tabs.
  o The user would be confused why they need to switch tabs, disable a
feature, and then switch back to enable a different feature (due to an
internal implementation strategy they should know nothing about)

If multiple connections to the same SSE stream URL were authorized by
the server to share the same data, then only one connection would be
needed per browser for the same scheme, host, port, path and query
combination.

Browser connection limitations are typically scoped by domain rather
than scheme, host, port, path and query, so if stream sharing is done
first, then it would be a straightforward matter to extend this to
stream multiplexing such that SSE messages on the same shared
connection could be associated with a given path and query, since the
scheme, host and port would be the same.

This would allow all streams from the same domain to use a single
connection, eliminating the HTTP connection limitation issue without
introducing an unbounded number of HTTP connections.  Multiple tabs
would be supported automatically, and end users would not be confused
why their stream is not sending any data.

Kind Regards,
John Fallows.
-- 
>|< Kaazing Corporation >|<
John Fallows | CTO | +1.650.960.8148
888 Villa St, Ste 410 | Mountain View, CA 94041, USA

Received on Friday, 20 March 2009 00:38:17 UTC