[Twisted-Python] New web project

Jeff Bauer jbauer at rubic.com
Thu Oct 10 16:59:12 EDT 2002


My first post to the TwistedMatrix list. ;-)

By way of introduction, I worked on Persistent CGI
for Bobo, Digital Creations' precursor to Zope.
I'm still using a modified version of Bobo/PCGI
under Apache for current applications and would like
to consider switching to Twisted.

Let me first say that I'm very impressed with the
Twisted framework.  Although I've not written any
servers yet, I was able to get a secure SSL web
service running soon after I downloaded the code.
(Someone please remind me to write a quick How-To.)

What follows is a description of how I'd like to use
Twisted.  A Use Case, as it were.  I'm specifically
solicting responses of the kind:

R1: "That's already a standard idiom in Twisted."

R2: "You can already do that in Twisted, but it
     may not be obvious.  Here's how: ..."

R3: "You *could* do that, but here's a better
    approach ..."

R4: "Twisted doesn't presently support that
    function, but here's what would be required
    to provide it ..."

---

Actors:  User, User-session, Facility

1. Each Facility would be handled by a single
   long running process (LRP).  Currently we
   handle each User-session in an LRP, which
   actually simplifies session management
   somewhat, but makes other things at the
   application level more complicated.

2. Users would access their facility via URLs
   of this kind:

   http[s]://facility1.site.com
   http[s]://facility2.site.com

   Twisted would dispatch this traffic to the
   appropriate Facility LRP, which is effectively
   a Twisted web server.  Each server (Facility) is 
   running on a different port.

3. Users would be authenticated in a manner
   similar to Apache's htpasswd mechanism,
   and a User-session is created.  Currently, 
   since all session work occurs under SSL, I have
   access to the REMOTE-USER environment variable.

4. I presently drop a Cookie in the User's browser
   representing the ID of the User-Session.  From
   reading Itamar's posting (Dec 17 2001), I gather
   that I should consider sessions rather than
   cookies.

Thanks in advance for any replies.

Jeff Bauer
Rubicon Research




More information about the Twisted-Python mailing list