[Twisted-Python] Chat by html application
Tibi Dondera
incoming at pronet-romania.com
Thu May 26 14:31:17 MDT 2005
Hello all,
I'm trying to develop a chat application through a browser, using
twisted (if possible)
What I want to do:
- a user logs in the website
- he goes to the "chat page"
- he has the "classic" chat interface (sent messages, list of online
users, "send a message" field). All of these are simple "divs"
- when he sends a message, a post with the message is submitted to the
server, and registered in a temporary database table (or in memory, is
there some "temporary" memory that I can use in twisted for this purpose
?)
- for refreshing the chat area, there is an open HTTPRequest in the
background. Twisted will do the following:
- accept the HTTPrequest connection
- keep it alive (i.e. do not send the answer, but maybe send some
empty chars to force the browser to keep the connection open)
- when a new message (from the other users) is available, send it
to the user and close the connection.
- in the user's browser, when the connection is closed (either with a
message, or after a certain timeout, that cannot be avoided anyway), a
new one will be opened, until the user quits the chat.
Questions:
- Is this a plausible solution ?
- Has this already been implemented (or at least partly) ?
- Can this actually be done with twisted ?
- Can I develop this on Windows ? (production will be on linux, but
still, I prefer developing local, and currently on windows)
- Can you give me any pointers to some existing code, or where to start
? (maybe jabber for twisted ?)
- How will a twisted http server coexist with my existing apache server
on the 80 port ?
- Must I subscribe to the twisted-http mailing list instead and ask this
question there ?
Thanks for any help.
Tibi Dondera
More information about the Twisted-Python
mailing list