[Twisted-Python] Webchat

Tommi Virtanen tv at twistedmatrix.com
Sun Feb 2 07:34:21 EST 2003

On Fri, Jan 31, 2003 at 09:41:15PM +0100, Achim Domma wrote:
> 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.

	Ldaptor includes functionality to stream LDAP search results one-by-one
	to a web page, as they are received from the LDAP server. This is pretty
	much equal to what your "room view" frame does. Twisted.web, no Woven
	used as this code predates Woven.

	See ldaptor.apps.webui.search.LDAPSearchEntry.handle_entry(), especially
	what is does to self.contentDeferred. You can browse the code
	on the web at


:(){ :|:&};:

More information about the Twisted-Python mailing list