[Twisted-Python] Webchat

Andrew Bennetts andrew-twisted at puzzling.org
Fri Jan 31 19:51:30 EST 2003

On Fri, Jan 31, 2003 at 09:41:15PM +0100, Achim Domma wrote:
> Hi,
> I'm new to Twisted an want to understand a little bit more what it can do
> for me. I have implemented a webchat using the asyncore module. If a user
> logs in, he will the redirected to a frameset. The top frame contains the
> 'room view' and is in fact an endless page, so the connection has to be
> keept alive as long as the user is logged in. The bottom frame contains the
> input form. It posts a message to the server and the message is written to
> the open connections of all users in the room.
> Could somebody explain me, if such an architecture is possible with Twisted,
> and what might be the benefits compared to using raw asyncore. If possible a
> very rought roadmap how to begin would also be very helpfull.

It is possible, and the benefits include the fact that it's already written:
have a look at the LivePage class in twisted.web.woven.page.  ;)

But yes, with Twisted Web, you get alot of control over how you respond to
requests, including the ability to keep them open and feed new data to them


More information about the Twisted-Python mailing list