InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks,
 
 For my existing application, we are planning to use SQLRelay, to pool database connection. However the application uses DBI heavily, via a wrapper class. The question is, how can I minimize the change to my code ?

Replies are listed 'Best First'.
Re: sqlrelay and DBI
by ides (Deacon) on Sep 02, 2005 at 15:47 UTC
    All you should have to do is change your DBI calls to use SQLRelay instead of whatever other DBD module you have been using.

    Frank Wiles <frank@wiles.org>
    http://www.wiles.org

      Can you share any info about how well SQLRelay works?

        Sure, I was actually surprised by how well it worked. I used it on a consulting project a few months ago where I needed to pool database connections for a Perl daemon to an Oracle database. If it hadn't been for a Cisco PIX firewall being misconfigured in between the two I wouldn't have had any issues.

        I'm a big fan of PostgreSQL, so when I need to do this sort of thing normally I would turn to pgpool.

        With the particular daemon I was working with the code was such that it held onto the db connection for the life of the child, but used it very very seldomly. SQLRelay allowed the code modifications to be very small, but at the same time handle the scaling of the database connections. It does it with an Apache like Start/Min/MaxServers like syntax.

        Frank Wiles <frank@wiles.org>
        http://www.wiles.org