[Twisted-web] Athena & browser 2-connection limit

Phil Christensen phil at bubblehouse.org
Tue Sep 16 10:46:19 EDT 2008


On Sep 15, 2008, at 2:23 PM, Harald Blåtand wrote:
> Hi there,
>
> Been thinking about this. It _would_ be cool if you could have more  
> than one LivePage per browser session, like in popups, or even frames.
>
> What do you think: Is there any obvious & fundamental reason why the  
> ReliableMessageDelivery stuff couldn't be modified, so that one  
> instance of it could be shared between several PageWidgets?

I'm not sure if I understand exactly what you're trying to do, but I  
have implemented a multi-window Athena app by sharing the LiveElement  
among the windows.

The drawback is that if the window holding your rendered LiveElement  
goes away, your child windows will lose their connection to the server.

In my case, I just have one LiveElement that handles all the  
communication between client and server. This is part of the main  
window, which also has a function like this:

     function getConnector(){
         return Nevow.Athena.Widget.get($('athenaid:1-client- 
connector'));
     }

At this point I can callRemote() on the returned object instance.

This works for me because of the simplicity of my application; with  
only the one LiveElement it seems that the Athena ID never changes, so  
this has been working really well for popping up editors and complex  
dialogs and so forth.

Also, I don't think I've ever tested this very thoroughly on IE, so  
YMMV.

-phil


More information about the Twisted-web mailing list