[Twisted-Python] Re: In Defense of Taps
bob at redivi.com
Wed Feb 12 20:22:27 EST 2003
On Wednesday, Feb 12, 2003, at 20:14 America/New_York, Andrew Bennetts
> On Wed, Feb 12, 2003 at 07:51:46AM -0600, Glyph Lefkowitz wrote:
>> On Wed, 12 Feb 2003 10:54:34 +1100, Adrian van den Dries
>> <az at CANTANKER.NET> wrote:
>>> Perhaps the TAP references in the howto should be moved later, under
>>> "Advanced usage" or somesuch, and the early docs concentrate on
>>> methods with
>>> which more users will be familiar (ie, standalone scripts).
>> This is exactly what I was arguing against.
> I disagree. TAPs have two benefits that I can see:
> - you can use twistd, which gives you solid daemonisation, signal
> handling, and logging.
> - you can get some sort of minimal integration using mktap
> - a vague promise that they'll do so much more later
> Most people don't care about the second point, and you can actually
> still use
> twistd without TAPs for the daemonisation, etc, if you really want.
> Regardless, if you're looking to learn how to use this cool Twisted
> you've heard about, daemonisation and whatnot can wait. You want to
> try write
> code that serves some wacky protocol you have, or whatever, and find
> out if
> Twisted is suited to what you're trying to do. It's nice to know that
> *can* take advantage of pre-written daemonisation, but I really doubt
> that a
> new Twisted user cares about *how*.
> Frankly, I see TAPs as one more concept that a new user shouldn't be
> burdened with comprehending. Reactors, Factories, Protocols,
> Transports and
> Deferreds are hard enough on their own. I really think docs that
> start by
> using reactor.listenTCP, and possibly app.listenTCP, are the way to go.
> Don't try make people swallow all of Twisted at once... it's just too
> 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
> the beginner docs that they had to skip past to get real work done.
> Twisted plugins its own, comprehensive doc that can assume knowledge of
> basic Twisted, rather than short-changing it by making it the
> doc. It could start with a section titled "Motivation", explaining the
> advantages of twistd and mktap.
I think I agree with you. As I see it, TAPs are not particularly
useful for developers *until* they're ready to distribute their
applications. Maybe they should be relegated to a section of the HOWTO
on "How to distribute your Twisted application" or "How to run your
Twisted application as a daemon"?
I think something to help this along would be to port twistd/taps to
win32, and allow it to become a Windows NT service? It wouldn't be too
More information about the Twisted-Python