Thread safety of DAs will be a significant issue in Zope 2, since Zope 2 wants to be multi-threaded, although it can still be run in a multi-threaded mode. Here's the scoop: If an underlying database API is thread safe and allows multiple connections in multiple threads, then nothing needs to be done. Database connections will be automatically pooled as part of the Zope database connection pooling mechanism. RDBMS database connections will be established as needed and kept only as long as needed to satisfy load. This will be very cool. Unfortunately, I fear that many of the database APIs (or possibly the Python database interfaces to them) are not thread safe. In the short term, I'll come up with a mechanism for assuring that only one thread is using a database at one time. This will allow some (most?) databases to limp along. I fear that some DAs will never work with a multi-threaded zope due to limitations in the underlying APIs. There are probably a number of DAs that can and should be updated to work correctly in a multi-threaded environment, in which multiple threads may have connections to the same database. People working on DAs should start thinking about this. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (1)
-
Jim Fulton