[Zope3-dev] twisted zope

Stephan Richter srichter@cosmos.phy.tufts.edu
Mon, 28 Jul 2003 11:43:41 -0400


On Monday 28 July 2003 11:26, Shane Hathaway wrote:
> Gary Poster wrote:
> > As to the request parsing, I like Twisted's design a lot. =A0My impress=
ion
> > is that if you used it, rather than Zope's request parsing, you would be
> > in for a lot more work, but that work would probably end up being a big
> > eventual win in clarity and simplicity. =A0If I were doing it, I'd punt
> > and stick with Zope's, with a regretful glance backward. =A0If you have
> > the gas to go up the mountain, though, I betcha the view's worth it. :-)
>
> May I suggest a different approach?
>
>
> Zope 3's HTTP request parsing is superior to Twisted's because it can
> more easily handle complex features of HTTP like pipelining. =A0However,
> Twisted's core is a better-executed implementation of the same idea
> behind asyncore. =A0Therefore, this is how I'd like to see the integration
> work:
>
>
> - Enhance Twisted's HTTP server with notions taken from Zope 3's HTTP
> server. =A0The most important notion is that there is a request object
> that does nothing but receive the request data. =A0Once the entire request
> is received, the request is used to construct an HTTP transaction; at
> that time the request is considered immutable. =A0Also, the generic
> memory/disk buffer concept could be a big win for Twisted.
>
>
> - Rename Zope 3's HTTPTask to HTTPTransaction. =A0Create IHTTPTransaction.
> =A0 (It might become part of Twisted instead of Zope.)
>
>
> - Add only specific modules of Twisted to the Zope 3 source, such as
> twisted.internet (I think that's its name). =A0Straighten out the
> licensing first.
>
>
> - Connect Twisted's updated HTTP server with zope.publisher. =A0Dump use
> of asyncore altogether--maintaining that is unnecessary work.
>
>
> - Connect Twisted's FTP server with zope.publisher. =A0Then you can merge
> the Zope branch.
>
>
> I feel like I could do this with two or three days of work, but I
> probably shouldn't. ;-) =A0I'd really like to see this done, though.

+1

=2D-=20
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training