[Twisted-Python] Re: In Defense of Taps
screwtape at froup.com
screwtape at froup.com
Wed Feb 12 17:43:20 EST 2003
On Wed, Feb 12, 2003 at 03:43:25PM -0000, 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.
OK, despite already having submitted patches that were applied to CVS,
I think I still qualify as a Twisted newbie. :)
I use Twisted in two situations - for work and for play.
At work, we use Twisted for two things - we take streaming data from
an upstream supplier, and store it in a database. Another set of
programs takes requests from our customers, queries the database, and
returns the replies.
All of our servers are running Windows 2000, and therefore most of our
Twisted scripts run as Python services. Some of them just run as
commandline apps that are started at login (although converting them
to services is on my todo list).
I don't use TAPs because in discussion once I heard they were really
rather Unix-centric, and also because I know that pickling the state
of a running application is difficult to do, and I don't understand
how TAPs would Get It Right. Also, I suspect that twistd doesn't play
nice in a Win32 environment (it's not an NT service, for example).
For config, scripts I write use Python's ConfigParser module to read
an INI file in a standard location. Since configuration is generally
limited to 'What host and port to I connect to? What port do I listen
on? Where's the database?', this system is quite sufficient.
At home, I use twisted.im as a framework for my own IRC bot (which
needs a redesign as I now know more about asynchronous programming
than I did when I started). Technically, it's still being developed,
so I run it in a screen-session where I can watch its output, rather
than as a demon.
For configuration, the startup script does 'import config', and the
config.py file has contains various variables with standard names. The
main reason for this is that most of the settings involved result in
structured data (account objects, a list of error messages, etc.) and
it was a lot easier to just point Python at the file and wind up with
a dictionary of objects than to write my own parser and so forth.
There's a few bits of Twisted I've run up against that I feel I should
understand but don't:
- coil: What's it good for? It doesn't appear to be some kind of
wrapper around the Windows Registry or GConf or XML storage or
- cred: Apparently this is something I need to get Right for PB to
work, but I'm not sure what it does. I'd have expected it to be
something like PAM for Linux - give it a name and password, and get
back 'allow' or 'deny' - but it seems this is not the case.
- spread: I understand banana and jelly, but PB surpasses me. I don't
have a clear mental picture of how information flows between the
two processes. I'm looking for an API that resembles 'connect to
this server, tell me what objects there I can talk to', but I'm not
There are other bits of Twisted I'd like to know more about
(twisted.web looks superficially similar in some ways to ASP.NET, and
I'd like to be able to compare and contrast) but in general I lack the
inclination or justification to look into them.
| Screwtape | Reply-To: munged on Usenet |________ ______ ____ __ _ _ _
| ULTRA Loves Those Recursive Acronyms
More information about the Twisted-Python