[Twisted-Python] Re: In Defense of Taps

screwtape at froup.com screwtape at froup.com
Wed Feb 12 20:07:13 EST 2003


On Thu, Feb 13, 2003 at 12:38:04AM +0100, Federico Di Gregorio wrote:
> i started by ignoring *everything* with the word 'tap' in it, mainly
> because i found the terms 'tap' and 'http server' togheter two times and
> was looking for something different. i also completely ignored coil.

It occurs to me that Twisted is a little daunting because it's
presented as a single. monolithic package. I think it would be helpful
if, at least in the documentation, there was more of a
provides/requires structure, or at least a concept map.

For example: 

	The core of Twisted is t.internet and t.python.

	t.protocols requires the Twisted core, and provides simple
	accesss to a variety of Internet protocols.

	t.conch requires the core, and implements the the SSH
	standard. It provides a Python-based equivalent to the OpenSSH
	tools, and (for example) allows Python-based programs to
	create and use SSH tunnels (or whatever else it does)

	t.enterprise requires the Twisted core, and provides a way for
	Python programs to access databases in a Twisted-style way.

	t.im requires the Twisted core and t.protocols, and provides
	an a multi-protocol instant-messaging client for the end-user.

...and so on and so forth.

Basically, for each module in Twisted, the Twisted newbie can see if
that module is likely to be (a) a framework they can use to do what
they want, (b) an application that does what they want, (c) a suitable
source of sample code.

Note that a conceptual module might not be identical to the current
module organisation - t.e.dbcred requires t.enterprise and t.cred but
doesn't provide any new abilities, so I'd consider it a module of its
own.

Say I want to write an IRC bot - it needs to be able to talk to an IRC
server and store information. I notice that t.protocols has an IRC
protocol, and t.enterprise has database access, so I can probably
cobble together something using only those two modules. I see that
t.im is an application rather than a framework, so I won't try and
build on that, but I probably *will* mine it for sample code of how to
talk to the IRC module.

As a side note, I think Twisted's applications should be as thin as
possible - if the application involves any abstraction at all (hello,
twisted.im!) that abstraction should be a framework, and the
application should just use the framework.

Screwtape,
...who nevertheless is not volunteering. Yet. :)

-- 
 ___________ ____________________________
| Screwtape | Reply-To: munged on Usenet |________ ______ ____ __ _  _   _
|
| "A glance, a stance, a broken romance; a disconnected telephone..." -- DEVO
|




More information about the Twisted-Python mailing list