[Zope] multipart pushing

Philippe J philippejadin2@swing.be
Fri, 23 Feb 2001 21:26:18 +0100


> I'd like to implement a chat function using the multipart content type and
I
> wonder if that is possible with Zope. My idea is to write a python script
that
> pushes the content of a database until e.g. the stop button is pressed in
the
> Browser. But how would the script know that it's supposed to stop? And
would
> such a longtime connection completely occupy one Zope thread so that I'd
have
> to increase the number of threads?

Not sure about the threads, but a quite comonly used trick is to generate
the html page as the chat evolves, without writting the ending </html> tag.
The browser will think the connexion is slow, and will continue to display
the page. You should not, however, use complex layout (tables), as the
browser sometimes need a complete page to display those.

Good luck