Tuesday, June 19, 2007

Power of Twisted

I have been planning to learn Twisted for long, but never got a real problem to try it. Today, I was writing an XML-RPC server, and felt that this was a good time to learn Twisted, since I was not feeling very comfortable with the rather simple XML RPC server provided by Python standard library.

I read the Twisted HOWTO on XML-RPC and was off and going within 30 minutes. Within minutes I had the same XML-RPC server rewritten to use Twisted's powerful reactor framework. It took some time to figure out how to add basic HTTP authentication, but with some googling I was able to do this also in a couple of hours!

Now, I have a small framework which consists of a module which provides an extensible XML-RPC server using twisted with basic HTTP authentication. Since Twisted supports SOAP also out-of-the-box, it is quite simple to extend this to support SOAP also.

The power of Twisted is quite amazing. I am thinking of writing a version of HarvestMan which runs on top of twisted...

No comments: