asynchat and threading
Jarek Zgoda
jzgoda at gazeta.usun.pl
Wed Nov 24 15:37:18 EST 2004
Anthony Baxter wrote:
>>I've embarked on a small learning project, trying to get a better grasp of
>>the asyncore and asynchat modules. The project involves building a simple
>>instant messenger application for use on our LAN - nothing heavy duty, as
>>99% of my reason for doing this is just to learn.
>
> I can only paraphrase what I said in a recent python-dev thread -
> absolutely *no-one* should be starting new projects using asyncore and
> asynchat. Use twisted, instead - it's cleaner, saner, has an active
> development community, and is in all ways a better solution than the
> asyncore approach.
>
> asyncore based code causes bleeding from the eyes and brain leakage
> through the ears.
Well, when writing simple (when I write "simple" I mean "really simple")
server or client for some simple ("really simple") protocol, Twisted may
be big overhead. I remember somebody said that if you need multiprotocol
application server then go with Twisted, but if you need client or
server for simple conversational protocol (like HTTP or NNTP),
asyncore/asynchat should be sufficient.
That doesn't mean I downplay Twisted. I really like it.
--
Jarek Zgoda
http://jpa.berlios.de/ | http://www.zgodowie.org/
More information about the Python-list
mailing list