Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by BMaximus (Chaplain)
on Jul 20, 2003 at 01:45 UTC ( [id://275975]=perlquestion: print w/replies, xml ) Need Help??

BMaximus has asked for the wisdom of the Perl Monks concerning the following question: (database programming)

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

Originally posted as a Categorized Question.

  • Comment on What is true database connection pooling and can it be done with Perl?

Replies are listed 'Best First'.
Re: What is true database connection pooling and can it be done with Perl?
by jeffa (Bishop) on Jul 20, 2003 at 16:12 UTC
    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!

      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
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://275975]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-09-07 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.