[Zope3-dev] Twisted / Zope

Shane Hathaway shane@zope.com
Tue, 12 Feb 2002 18:02:52 -0500


Itamar Shtull-Trauring wrote:
> 1) Zope3 HTTP server is very likely better than Twisted's. At the very 
> least Twisted's doesn't do persistent connections, a serious issue for 
> browser-oriented sites. So using this code in Twisted may be a good 
> idea, except we probably wouldn't because of licensing issues (don't ask 
> :).

I wouldn't say Zope3's HTTP server is *better*, but I would say it is 
better suited to an application like Zope.

> 3) Twisted has its own web framework, which might concievably be better 
> suited to custom apps that integrate with Twisted than Zope3. But we do 
> want to support ZPT in this separate framework (theft is the sincerest 
> form of flattery.)

I do think we'll see convergence between the different frameworks, but 
it will take a while.

> 4) In terms of speed, I got 200-400 requests a second (depending on if 
> it's from memory, disk, size, etc.), 30MB/sec on large files (P3/866). 
> In any case, the real bottleneck in Zope is not the HTTP server, but the 
> content being rendered. People keep asking if it's faster, and I keep 
> telling them it's not relevant :)

Agreed!  FYI my performance numbers measured the HTTP server returning 
static strings.  You won't see those kind of numbers with a publisher 
hooked up.

> 5) "More object-oriented" is not necessarily good - too many layers of 
> abstraction can slow you down. One thing Twisted does too that 
> *asyncore* doesn't is separate between transport (TCP or SSL) and 
> protocol (HTTP). And from what I can see Zope3 does that too, albeit in 
> a less elegant way than Twisted (asyncore's influence still being felt).

You're probably right.  asyncore is a nice framework but it's too 
restrictive in some ways.

> If you *do* want SMTP/IRC/whatever integration (and choose not to use 
> twisted's own web framework, which would work fine for Mailman, 
> certainly), then there's some merit in using Twisted. Or if you want to 
> build a inteface to control Zope from a remote app (be it in Python, 
> Java, or *shudder* Emacs) using Twisted's remote object protocol.

Thanks for the summary, Itamar.

Shane