Launching Multiple Servers

Andrew Dalke adalke at mindspring.com
Fri May 23 20:12:37 EDT 2003


Andrew Bennetts:
> This is mainly conjecture on my part, but as far as I can tell, the main
> reason why some people have trouble is they can't narrow down the docs and
> examples to what matters most to them.  We have a fairly large amount of
> terminology, which can leave people wondering "What the hell is 'reactor',
> 'factory', 'woven', 'spread', 'pb', 'TAP', 'Deferred'..." (which is why I
> wrote the glossary).

I, for one, agree with that.  I understand names like 'reactor' (because of
Sam Rushing ;) and 'factory' - it's the Twisted-specific names which
throw me for the loop.  "pb" means nothing to me.  I remember the
reference to "peanut butter" which induced the names "jelly" and "banana",
but then I forget which is which.  Even its expansion to "Perspective
Broker"
doesn't help me much.  I would rather prefer the name "Proxy Broker"...
assuming that's what it does.

>  And the
> example code is very poorly categorised, and in places could do with more
> comments describing what they demonstrate.

Or that the code does unexpected things.  I was experimenting with it
and found that *importing* Twisted overrode how logging is done.  My
import warnings (a 2.2 extension used under 2.3) were going into
never-never land.  I tracked that down and I believe it's fixed in the
current code.

In general, I got the feeling that Twisted does its own thing.  That is,
it uses its own names, it override at least some ways Python does
things, and I noticed it tried to fake a "sychronized" keyword for
some of the logging, rather than use a more Pythonic Queue.  It
even has its own VMS-style command-arg parsing (including
the automatic prefix expansion I don't like) rather than use Python's.

Admittedly, the logging code I looked at is considered old, so perhaps
feelings have changed, but there was talk of writing a new logging facility
because the one to be included in Python 2.3 wasn't good enough,
which again suggests a tendency towards idiosyncratic code.

That doesn't mean I won't use it, I just suggest that this tendency to
write code with non-standard behaviour (wrt "Pythonic" code) makes
it harder for some people to use Twisted.

> [1] When I started using Twisted, I had to learn pretty much everything by
>     asking on IRC; even the "Writing Servers" document didn't exist.

I've done IRC now 3 times, all for Twisted.  IRC just doesn't really fit
my mind, which has been warped by Usenet-style interactions.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list