[Twisted-Python] Re: In Defense of Taps

Stefano Debenedetti ste at webaccess.mozquito.com
Wed Feb 12 21:49:01 EST 2003

Moshe Zadka wrote:
> I encourage the "newbies" on the list to speak up: what are *you* planning
> to do with Twisted, and which documents would help you with that.

There we go: I am a newbie in both twisted and python, I was attracted to them together by the fact that twisted provides some support for a lot of protocols and that it is lightweight and small enough to understand immediately where to dig in if you need to be closer to the metal-over-the-wire... 

I am using twisted for building an application that allows to view and modify XML data over all possible protocols (http, mail, irc, p2p, ecc.), in other words, a multi-protocol server whose contents, logic and presentation are defined as one XML data model.
The idea is to have some kind of middleware with some basic XML functionality (XSL/XPath/XQuery), make it accessible in many different ways and to hide physical storage of data behind that.

People lately tend to argue that the everything-is-XML POV is Bad and also people already laughed at me on the irc channel about all that.. let's say that even if it sounds absurd I would really like to use twisted for such things ok? You aren't the kind of folks who blame people for thinking different, are you? ;-) 

Also: twisted+libxml2 seems to be able to handle much better heavy XML data flows than Tomcat+Xalan on the same hardware.. it would be a shame not to use it for doing some of the web services stuff that get all the hype nowadays. 
I am interested in understanding more of cred because it seems it would be a perfect fit for authorizing access to XML nodes that are seen as parts of the same data model but physically lie in different servers and are accessed through different protocols.

I am also interested in how to write APIs that return deferreds (this topic is listed in the howto page but there's no link yet: is "Wrapping new kinds of selectable resources" what I need?) but I still haven't come up with a better way other than to use threads i.e. of course some XML work I need to do takes an awfully long time even if it's done in C by Gnome's libxml2, how can I wrap it in an asynchronous api without using threads? I already ran into the infamous python threading IO deadlock.....

Oh and btw I had no problem starting to look at twisted from TAPs, I like the concept for being a different approach and most importantly for being The Fastest Way To Share A Folder Over The Web From The Command Line (which is a great thing), but I have to confess that reading this thread pushed me to try and do without them for the first time and I just decided I am not going back there immediately: I think having the possibility to choose is invaluable.

Thanks a lot, ciao

p.s. the release motto of version 1.0 rocked! I will write it here again 'cause I like it so much:


I think adding it to the release was pure genius, it cheers me much more than the sandwich ingredients analogy ;-)

More information about the Twisted-Python mailing list