[Twisted-Python] Re: In Defense of Taps

Abe Fettig abe at fettig.net
Thu Feb 13 13:24:04 EST 2003

On Thu, 2003-02-13 at 05:26, Glyph Lefkowitz wrote:

> A new Twisted user in any domain except low-level networking should
> require only cursory knowledge of Reactors, Factories, Protocols, and
> Transports.  Assuming we have 3 classes of user:
>     * network protocol developer
>     * RPC developer (using PB)
>     * web developer

I'd be in the "Network protocl developer" category, I guess, although my
on of my reasons for using Twisted is to *not* have to implement

Background: I came to Twisted looking to improve my Hep Message Server
project.  Hep is a message server than can send and recieve messages
(e-mails, web pages, RSS feeds, etc) via SMTP, POP3, and HTTP currently,
and NNTP, IMAP, and IM in the future.  I had written my own support for
POP3, SMTP, and HTTP servers using python's asyncore, which worked OK,
but I wanted to switch to a more featureful framework that would save me
the effort of writing and debugging asyncore servers.

> _All_ of these developers should be aware of TAPs and Deferreds, and only the
> network protocol developer needs to have a really thorough understanding of
> Reactors/Factories/Protocols.  The web developer can get away with only a
> rudimentary understanding of Deferreds, too.

90% of what I'm using in Twisted so far is protocols + reactor. TAPs to
me are a nice bonus, something that comes with the framework for free.  
Maybe if I was a web developer, doing less low-level stuff, TAPs would
have seemed more important.  But when I'm writing thousands of lines of
code already, having to write another little script to start my
application and run it as a daemon seems a lot easier than writing a TAP
plugin and having to "compile" a new TAP every time I make a change to
the code.  Once I get to the point where end users are installing my
software, TAPs will probably become more important.  But when I'm just
running the software myself, to debug it, I don't care about the
features TAPs might provide.  Thus in my mind it seemed makes sense to
use the other parts of Twisted before I got into TAPs.

> However, TAPs are one of the few base mechanisms for services to communicate
> with each other within the Twistedverse.  

Could you explain (or point to some info on) how TAPs can provide
"mechanisms for services to communicate with each other"?  I'd be
interested in that.

> > I'll even go so far as speculating that this will cause more external
> > projects to use TAPs, because they won't be seen as some annoying idea in the
> > beginner docs that they had to skip past to get real work done.
> Based on my experience thus far, I doubt this very much.  I'd be interested in
> a simple show of hands that indicates whether this is an accurate perception.

"Had to skip past to get real work done" - yes.  But that doesn't mean
I've abandoned the idea of ever using TAPs.

> While I think of this as an important introductory doc, it's already the 18th
> document in the book.  In fact, it comes after "Using Dirdbm", which I think
> may be shortchanging it a *bit* more than treating it as introductory :-).

Didn't it used to be right at the front?  I remember it as being one of
the first things I read.  Actually, the current HOWTO layout looks like
it's gotten a lot better since I was last there...

I really like Twisted, thanks for all the work you guys have done!


More information about the Twisted-Python mailing list