Abigail-II is right, there are many modules on CPAN related to pooling. If you are running your server with Apache/mod_perl, the simplest is to use Apache::DBI, it works great, I have used it for years. If you however are not going to use Apache/mod_perl, then I found ResourcePool with a quick search for "database pools" on CPAN. There seemed to be alot of "pool"-oriented modules there, although not all DB-oriented. You can always read the module code though, it may provide ideas.
Now, you say "academic" alot, so i am going to take a guess that you are actually looking more for information about how to write a connection pool, rather than a connection pool module you can use. (after all the point of academics is to accumulate knowledge and learn is it not? or is it all about beer and parties?). In that case, I would just Google any combination of "database" and "pooling", and see if anything worthwhile pops up.
From what I know (and dont take me as an expert) resource pooling really is as simple as setting up an array (or hash or whatever data structure strikes you fancy or fits your requirements) and then being very very very very anal about managing those resources. If its DB connections, you need to always check that they are in fact connected, don't require rollback of cleanup in some way, and are generally in good working order before giving them out. As for reclaiming them, you can either force the user of your pool to do this, or (as in Apache::DBI) assume a one per-process connection (and since one client to one process is usually a fair assumption, management becomes pretty easy). It has always seemed to me that there was never any deep magic to DB pooling, just good old common sense and a big health dose of paranoia.
I know nothing about SOAP however, so I will rely on the other monks to answer that part.
-stvnIn reply to Re: Database Connection Pools with Perl
by stvn
in thread Database Connection Pools with Perl
by Tanalis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |