Quixote+Nevow+LivePage

Carlos Ribeiro carribeiro at gmail.com
Sat Dec 4 13:06:16 EST 2004


On Sat, 04 Dec 2004 17:46:02 GMT, Jp Calderone <exarkun at divmod.com> wrote:
> On Sat, 4 Dec 2004 15:40:44 -0200, Carlos Ribeiro <carribeiro at gmail.com> wrote:
> 
> 
> >On Sat, 04 Dec 2004 16:17:06 GMT, Jp Calderone <exarkun at divmod.com> wrote:
> > >   I haven't used LivePage myself, but someone in the know tells me
> > > that LivePage requires an extra, non-HTTP connection to operate, so
> > > will pretty much only work with Twisted.
> >
> > The basic technique is to use a "persistent" & hidden client-side
> > frame that holds the JavaScript glue code. This code is not reloaded;
> > it talks to the server using XMLRPC, which is an extension that is
> > supported by many HTTP servers, and then uses the data to update the
> > view (that is in another frame). A clever hack -- a "client-pull"
> > model at its best. IOW: as far as the server is concerned, if it
> > supports XMLRPC, then it's possible to implement something similar to
> > LivePage.
> 
>   LivePage is more about server-push than client-pull.

Strange, but when I was writing my own message, i *did* use
"server-push", at first, but then stopped -- it's really client-pull,
only that the client does it automatically. Client-pull is simple: the
JavaScript code simply fetches data from time to time, or when some
other kind of event happen.

Said that, a disclaimer: I'm just starting to study these tricks, so
my knowledege about it is far from definitive. For example: I'm not
sure if you can leave an open socket in the JavaScript code and wait
for the server to send more data to you in a server-push manner.
Perhaps you can do it using an persistent HTTP connection... but I'm
not sure if this will work with XMLRPC. I guess no, but I may be
wrong.

-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com



More information about the Python-list mailing list