But I know the limitations of threads in python, how to break it and where >> twisted comes in. >> >> Twisted is not just a solution for threads and more over threads in > python are problematic (?) at CPU level and not at IO level and > twisted is for asynchronous operation at IO level that is why is it > helpful in designing a lot of Networking Software. >
Please read my presentation notes, I am not talking about Twisted, I am talking more about the 2 approaches, the second approach being used in designing twisted giving you a clear reason to use twisted. And, 0. If you just want to do Networking Software, asyncore is availiable in native python, why use twisted ? Where does IO comes in most networking software ? 1. Threads in any programing language is problematic, unless until used right.* Python is different, due to its abstractions.* 2. For developing a concurrent system the most crucial thing is write to read ratio, Twisted is used for network programing because the ratio is low in most cases, and due to the async bindings for read/write it aids to concurrency. In a single threaded approach you get stuck when a layer is taking more time to do the operation, ie if the read write (IO) is slow, it results in a slow thread, and it makes the system less concurrent by blocking further operations, mostly by blocking reads. When you take the total picture here the system as a whole becomes slow. The thread pool drains down and boom! One thread can cause enough destruction. Read about SEDA, I don't know if you have experience developing multi threaded applications in python or per say any language, you would understand the problem if you have. _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers