Re: Re: [NOVICE] Re: re : PHP and persistent connections - Mailing list pgsql-hackers
From | Don Baccus |
---|---|
Subject | Re: Re: [NOVICE] Re: re : PHP and persistent connections |
Date | |
Msg-id | 3.0.1.32.20001127071848.01b23440@mail.pacifier.com Whole thread Raw |
In response to | Re: Re: [NOVICE] Re: re : PHP and persistent connections (Ron Chmara <ron@Opus1.COM>) |
Responses |
Re: Re: [NOVICE] Re: re : PHP and persistent connections
|
List | pgsql-hackers |
At 12:38 AM 11/27/00 -0700, Ron Chmara wrote: >Don Baccus wrote: >> At 12:07 AM 11/26/00 -0500, Alain Toussaint wrote: >> >how about having a middle man between apache (or aolserver or any other >> >clients...) and PosgreSQL ?? >> >that middleman could be configured to have 16 persistant connections,every >> >clients would deal with the middleman instead of going direct to the >> >database,this would be an advantage where multiple PostgreSQL server are >> >used... >> Well, this is sort of what AOLserver does for you without any need for >> middlemen. > >What if you have a server farm of 8 AOL servers, and 12 perl clients, and >3 MS Access connections, leaving things open? Is AOLserver parsing the >Perl DBD/DBI, connects, too? So you're using AOLserver as (cough) a >middleman? <g> Well, no - we'd use the built-in Tcl, Python or nsjava (still in infancy) modules which interface natively to AOLserver's built-in database API. You don't NEED the various connection implementations buried in various languages because they're provided directly in the server. That's the point. That's the main reason people use it. If you're going to run CGI/Perl scripts using its database connectivity stuff, don't use AOLserver. They'll run since AOLserver supports CGI, but they'll run no better than under Apache and probably worse, since no one doing serious AOLserver work uses CGI and therefore the code which implements it has languished - there's no motivation to improve something that no one uses. If you're willing to use a language module which exposes the AOLserver API to your application, then AOLserver's a great choice. >> Again, reading stuff like this makes me think "ugh!" >> This stuff is really pretty easy, it's amazing to me that the Apache/db >> world talks about such kludges when they're clearly not necessary. > >How does AOL server time out access clients, ODBC connections, Perl >clients? I thought it was mainly web-server stuff. Well, for starters one normally wouldn't use ODBC since AOLserver includes drivers for PostgreSQL, Oracle and Sybase. There's one for Solid, too, but no one seems to use Solid since they raised their prices drastically a couple of years ago (if you're going to spend lots of money on a database, Oracle and Sybase are more than willing to help you). Nor does nsjava use JDBC, it encapsulates the AOLserver API into a database API class(es?). AOLserver manages the database pools in about the same way it manages threads, i.e. if a thread can't get the handles it needs (usually only one, sometimes two, more than that usually indicates poorly written code) it blocks until another thread releases a handle. When a thread ends (returns a page) any allocated handles are released. Transactions that haven't been properly committed are rolled back as well (lesser of two evils - the event's logged since it indicates a bug). For each pool you provide the name of the driver (which of course serves to select which RDMBS that pool will use - you can use as many different RDBMSs as you have, and have drivers for), a datasource, the maximum number of connections to open for that pool, minimum and maximum lifetimes for connections, etc. - Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert Serviceand other goodies at http://donb.photo.net.
pgsql-hackers by date: