Shane Hathaway wrote:
Jim Fulton wrote:
Tim and I have discussed this for some time. We think an
asynchronous I/O approach is still appropriate, to handle
asynchronous messages from servers to clients, but we need
to get away from expecting a server to provide the asyncore
main loop needed by ZEO. Rather, ZEO should provide its own
main loop running in a separate thread. (Or, possibly, each
client storage should have its own thread.) Among other things,
this would allow us to get rid of the horribly complex dual-mode
code we have now.
I think that's a good strategy.
(Note that we've had lots of frustration with asyncore. It is
tempting to get rid of that at the same time. However, we still
need an asynchronous I/O framework. This would probably requite
a switch to Twisted. This might be worthwhile, but would almost
certainly entail a lot of risk. I'm not at all sure the benefit
is worth it unless there were some able volunteers who wanted to
work on it.)
Last I checked, Twisted could not support a private event loop. Twisted
assumes there is only one event loop for all threads. I'd like to know
if this has changed. The asyncore module can support a private event
loop, although it's ugly--you have to pass the 'map' argument all over
Historical note: asyncore didn't support private event loops either
until I added the extra argument to the constructor. I'm not sure why
you need to pass the map to anything but the constructor. Oddly. most,
but not all of the methods that take a map, default to the one set in the
constructor. I don't really remember the details....
Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org