[Zope3-dev] twisted zope

Itamar Shtull-Trauring itamar@itamarst.org
Mon, 28 Jul 2003 14:50:39 -0400


While improving Twisted's HTTP server is something I'd love to see done
(and I will be doing it myself eventually), it's probably not the best
approach for fast integration. Twisted's HTTP does do pipelining for
1.1, but it has a number of missing features that mean Zope3's is
probably better for now.

I was thinking that an initial Zope3/Twisted integration strategy would
work in a way similar to what PJE suggested. That is, only use the
low-level networking core, replacing asyncore with twisted.internet, and
continue using Zope3's HTTP code for now. You could *probably* support
both asyncore and Twisted, although personally I think asyncore's design
is just not good enough for real apps. It's fixable, certainly, but you
just end up duplicating lots of work we've already done.

Once you have that you could then think about working on improving
Twisted's http.

Waking the event loop from a thread is done using
"reactor.callFromThread(f)", that is, f() will be called ASAP in the
event loop thread.

Oh, and be aware that Twisted's FTP server is rather sucky, and is going
to be rewritten.

-- 
Itamar Shtull-Trauring    http://itamarst.org/
http://www.zoteca.com -- Python & Twisted consulting