More on Python for networking: a performance comparison of different asynchronous frameworks, including Twisted and Tornado. It focuses on raw performance (it is just an HTTP echo server implemented in each platform, and tested with httpperf), so it ignores the features provided…
However, it has brought to my attention two frameworks based on libevent: Gevent and Concurrence. Gevent provides some bindings for libevent for Python, adding the use of greenlets to the equation. Concurrence goes one step further by using “Lightweight-tasks-with-message-passing approach to concurrency“, providing “an easier programming model for writing high performance network applications than existing solutions (Multi-threading, Twisted, asyncore etc).” Concurrence can be used with the greenlets library or with ‘Stackless Python’, a branch of the standard CPython that is supposed to give better performance on multi-threading programs.
All these frameworks looks really promising if you are looking for raw performance, but I stick with Twisted for my experiments. The huge number of protocols implemented by the standard distribution, its more-than-good documentation, and all the mailing lists and blogs, make Twisted a good platform for developing networking applications, even if there are other, faster alternatives on the market.


