The Vision Thing (was Re: [Twisted-Python] Bloat)

Clark C. Evans cce at
Wed Apr 16 11:17:39 EDT 2003

On Wed, Apr 16, 2003 at 03:30:33AM -0500, Glyph Lefkowitz wrote:
| Yes, but then, the things that we characterize as "applications" these 
| days are really frameworks.

Ok.  I define an Application as a service which provides or
responds to specific user-level content.   Those software
components which can be shared by more than one application
are canidates for inclusion into Twisted.

| In the ideal world, Twisted would start up and take over all 
| UNIX-networking-y services that you ask it to; a webserver, a mail 
| server (POP and SMTP), an IRC server, a rendezvous client and server, 
| and a generic PB port that would provide access to all this 
| functionality through a better protocol.


| Applications would then hook into this environment and provide either 
| enhanced versions of infrastructure - say, database-backed message 
| storage rather than maildirs - or more frequently, domain objects that 
| would do things completely unrelated to infrastructure.  For example, a 
| message board, a chatterbot, a knowledge management system, etc.  These 
| applications would then hook multiple URIs.  A chatterbot might have an 
| IRC nickname as well as an email address, and would respond similarly 
| (but not identically) to either.

Right.  Are these applications considered part of Twisted?  For
instance, I can picture an 'Baseball Stat' application which
uses an IRC bot, plus a HTTP interface, etc.   

For contrast, let's say that a IMAP implementation which is part
of Twisted comes with a maildir backend; but then, someone provides
a generic database back end, a layer which maps database structures
onto IMAP requests.  As long as it is 'generic', in that it can work
with more than one set of user content (and thus possibly different
table structures, or with a single but generic table structure),
then I'd consider the database back end Infrastructure.

However, if this database backend maps only to one set of tables,
perhaps specific to a problem domain, I'd consider it part of
the Application.

So, the question is, when does a software component which is 
part of an Application become a canidate for inclusion into
Twisted... I'd say, when it is used by 3 or more Applications,
one of which is open source (which may be trivial, but is used
as an example)

| By having the actual protocols taken over by the infrastructure like 
| this, multiple applications (some of them running in different OS-level 
| protection domains) can all talk to the same core services at once.  
| Two chatterbot instances owned by different users might even converse 
| with each other over the core infrastructure layer, either on the same 
| host or on different hosts.
| The existing codebase obviously doesn't implement terribly much of 
| this, but you can see some of it.  Some people consider a web-server an 
| "application", but 'mktap web' starts up and serves web pages.  'mktap 
| words' starts a chat server.  'im' starts a chat client.  Over time 
| these will become more unified and integrated.

Ok.  I don't really consider the generic web server as an Application,
IMHO, Apache is *not* an application.  Apache plus a content directory
and a given configuration file is an Application.  In this respect,
the configuration of the Webserver is the 'program'.

| To put it simply, "yes, Twisted is a framework, which means it's an 
| application".

A line has to be drawn, I like the idea of calling the stuff outside 
Twisted the Application.  If you define Twisted as an Application, 
then we just need another name for what is outside the line.  I'd
rather not find another name... and the purpose of this discussion
is to draw a distinction for what is in and what is not in Twisted.

For instance, a particular IRC chat client (/w a user interface)
should not be part of Twisted, as it will probably include lots
of specific assumptions as to how a given user would chat.  However,
just about everything that a chat client needs could be a 
canidate for Twisted.

Perhaps what we need is a 'apps' directory in the top level
of Twisted directory (but not in the twisted.* package) where
people can drop in Applications which they would like to share
with the community; but are not necessarly maintained by
the Twisted Community.  



More information about the Twisted-Python mailing list