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

Phil Christensen phil at bubblehouse.org
Tue Sep 16 11:04:40 EDT 2008


On Sep 16, 2008, at 10:46 AM, Phil Christensen wrote:
> 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'));
>    }

Just wanted to mention that $ is just an alias for  
document.getElementById, it's not prototype or jquery or anything like  
that.

> 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.




More information about the Twisted-web mailing list