RE: Multiplexing

"Adam Rifkin" <[email protected]> Fri, 30 Jan 2004 16:37:01 -0800
Newsgroups gmane.comp.web.mod-pubsub.devel
Message-ID <[email protected]>
Whoops, I'm scatterbrained today.

I just wrote:
> > > A key difference is that in mod_pubsub, a single push connection can
> > > be shared by several open browser windows in the same browser process.
> > Yes that is cool. Multiplexing is on my TODO.
> Multiplexing is simple and can even be done from a completely single-threaded
> application; take a look at the pubsub.py server in mod_pubsub for an
> example of how to do this.

This is certainly true for server-side multiplexing.

Client-side multiplexing is a much trickier proposition.  We use cookies,
setTimeout(), and window.open() to share JavaScript object references
between windows.  There is a slightly broken leader election protocol
to decide which window holds the persistent connection at any given time.
If all goes well, persistent connection migrates automatically when
windows are closed or new windows are opened.

   Adam


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn