Perrin Harkins wrote:
Stas Bekman wrote:

FWIW, we are discussing the internal DBI pooling mechanism at the dbi-dev list and having already a sort-of-working prototype. So hopefully there will be no need for Apache::DBI in the near future, as DBI will be able to handle pooling internally. However it may take some time, as the drivers will have to adjust to support the new functionality.

You can see the thread here:
http://archive.develooper.com/[EMAIL PROTECTED]/index.html#02118

Some working examples are attached to this message:
http://archive.develooper.com/[EMAIL PROTECTED]/msg02134.html

This is totally cool, Stas! Nice work. I look forward to answering "yes" when people ask if mod_perl has database connections pooling.

;)


actually it's going to be: "if perl has database connections pooling", which will include mod_perl by definition.

Also, the pooling mechanism should work transparently w/ and w/o threads on the user level.

By the way, to completely get rid of Apache::DBI this would need to cover the safety functionality in there as well, i.e. the pinging and the part where it rolls back any pending transactions when a a handle is returned to the pool.

Certainly. Quite a few features are missing. The first step was (is) to make the dbh shared between threads (which is far from trivial). The rest should be just a matter of coding.


re: rollback, the DBD drivers will perform the normal disconnect(), but without doing the physical disconnect, and normal DESTROY, without destroying the datastructures which maintain the physical connection, so there shouldn't be much to change for this feature.

Only the ping() is needed to be added to connect().

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to