Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Just another Perl shrine
 
PerlMonks  

Answer: What is true database connection pooling and can it be done with Perl?

( #276060=categorized answer: print w/ replies, xml ) Need Help??

Q&A > database programming > What is true database connection pooling and can it be done with Perl? contributed by jeffa

There are a few nodes here about connection pooling. Just search for database connection pool.

According to Webopedia, a connection pool is:

A cache of database connections maintained in the database's memory so that the connections can be reused when the database receives future requests for data.
full definition.

Can it be done in Perl? Of course!

Comment on Answer: What is true database connection pooling and can it be done with Perl?
Re: Answer: What is true database connection pooling and can it be done with Perl?
by fx (Pilgrim) on Jan 03, 2004 at 22:32 UTC

    Can it be done in Perl? Of course!

    Although I fully support (and indeed try to practice) the art of giving people pointers to answers and then letting them research the rest, I believe your last sentence is lacking in this case.

    I am currently looking for a way to implement a pool of (Oracle) database connections and am hitting brick walls at most corners I turn. DBD::Oracle does not seem to play nicely with iThreads in stark contrast to the documentation, the DBI users mailing list has been unable to help so far, and CPAN lists no (mature / database) pooling modules with the exception of ResourcePool which has iThreads listed under the Limitations section.

    Update: Perhaps I'll turn this into a meditation...

      One thing you should have in mind is DBI is not thread safe! So, working with 'pure' DBI + threads is a dangerous way because the treatment of this thing will be stay by your own. And believe me! This a very boring task!

      If you're using( or want to use ) some database abstraction, you can search for DBIx::Class namespace. There are various pooling solutions. Google refs

      But if you don't want to use database abstractions, I recommend for you AnyEvent::DBI and/or AnyEvent::Tools CPAN refs .

      Cheers!

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-04-21 02:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (489 votes), past polls