Ian Bicking: the old part of his blog

Re: Concurrency and Processes

I've been using Twisted for about two years now, and I have to agree: Twisted is not easy to use. The other problem I have in using Twisted is that you have to use it for everything -- any kind of blocking call in the standard library is out of the question unless you wrap it in a thread. It's just always extremely clear, that in Twisted, you aren't using Python as it was intended.

Having said that, noting that the scalability of a Twisted server verses that of a threaded or forking one (developed in Python) speaks for itself. You can manage concurrency with threads in Python, but it just can't compare to the asynchronous framework. I don't know what kind of work you do, but in working on systems that have hundreds of chat network sessions open, Twisted's ugly but it does the job.

I'd like to get to know more about Ruby's microthreading model -- it looks a lot like what Twisted does, but as part of the language.
Comment on Concurrency and Processes
by Ken Kinder

Comments:

The one thing I'm sure of, twisted is a great idea with a horrible implementation. If they would implement something along the lines of ACE, things would be better. Heck, just embracing more established design patterns would be a good thing...and in the end, that's the only area I can give high marks to twisted.

# anonymous

I have the same opinion about the Twisted - being enthusiastic at the beginning, I have invested some time in it, but now I'm a bit disappointed. It's just not how a program must flow - inside out, throwing in countless microcallbacks and keeping state variables. I'm not unfamiliar with the asynchronous model, but it have very restricted use.

More, the Twisted is in very raw state yet. For example, it's a shame that there is no good http client in the network toolkit. But worse, you cannot use the httplib from the standard Python distribution - it is, naturally, totally unusable with the Twisted, and this is a common problem with asyncronous model.

After all, if your application is simple, you'll have no problem with threads, but if it's complicated, you'll get troubles with the Twisted as well, no less than with the threads model.

# jk