Foxcub,

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.

-stvn

In reply to Re: Database Connection Pools with Perl by stvn
in thread Database Connection Pools with Perl by Tanalis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.