There’s a neat article about Twisted over at OnLamp.com. It gives the following snippet to make and run a Twisted web server:
$ mktap web --path=/var/www $ twistd -f web.tap
So I tried it out on Windows, and, amazingly, it Just Works. Definitely simpler than setting up IIS or Apache, once you find out what to do. Impressive.
I have a small server application in mind, and I’ll definitely be giving Twisted a try.
Comments
I'm using Twisted in my (upcoming) game, Typegeist. It has manage connections to lots of Flash clients (using XMLSockets on the Flash side). It doesn't use any of the webserver functionality, just the basic reactor (event queue model) and TCP stuff, but these are so easy to use that writing your own persistent-state network apps is a walk in the park.
(I only found out later that Twisted started off as a network game engine, exactly what I'm using it for)
This looks very interesting. I'll be interested to hear how your server application goes.
Nevertheless, Twisted is not too well documented, and it takes a lot of time to wrap your mind around it all. It is also changing, meaning that not all parts are stable.
I guess it appeals more to "hackers" than to "corporate drones", and you are rewarded for your investment. The potential is huge and way beyond web sites, although that's what I use it for and I prefer it to anything else.
Basically, great stuff. But you need to invest, it is not plug-and-play as the above article suggests.