Christoph Zwerschke said: > Warren, it would be also great if you could add your DbConnectionPool > to the DBUtils suite, as another DB pooling module. DBConnectionPool > uses a different approach for dealing with bad connections (by running > an expiration thread), so it would be good to have it as an alternative. >
Christoph, I have looked over your code and I am impressed. You have done a much better job of addressing the issue of database resource stability than I did with DbConnectionPool. In fact, if you were to add the expiration feature, I see no reason why anyone would want to use DbConnectionPool over your code for database connections. DbConnectionPool was a fairly simple approach to resource pooling. In fact, very little of the code is actually database connection specific. Because of this, I have since factored out the core pooling and expiration logic into a ResourcePool module and used it for pools of other kinds of resources, such as ftp connections, FormKit form objects, etc. It works fine as a generic caching mechanism for things whose creation can be time consuming and whose state must be "owned" by only a single thread at a time. However, it does not provide a good solution to resources that become bad before expiration. For this reason, it is not as well suited to database connections (or any external resource connection for that matter) as your solution is. Your concept of "tough" database connections is intriguing and could, with a little work, be abstracted and reused to make other kinds of "tough" resources. This would be a valuable tool for Webware specifically, but also for the Python community in general. Others have suggested that your work become a package separate from Webware. I agree. As far as I can see, there is nothing except examples in the documentation that is Webware specific. -- Warren Smith [EMAIL PROTECTED] ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Webware-devel mailing list Webware-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-devel