[ale] database connections and presenting data on the web

Greg Freemyer greg.freemyer at gmail.com
Thu Mar 18 10:10:25 EDT 2010


In Tomcat/Java I think its called a connection pool.

You establish a pool of connections, then your page requests a
connection from the pool, makes a query, and returns the connection to
the pool.

It greatly reduces your resource load associated with making and
dropping connections so often.

I've only used a connection pool with a single backend DB, but I
assume you could create multiple pools, one per backend DB.

I'd be surprised if there isn't a similar solution for Apache.

Greg

On Thu, Mar 18, 2010 at 8:57 AM, Mark Heiges <mheiges at gmail.com> wrote:
> I don't use postgresql but with oracle we use dblinks for things like
> this. One database maintains connections to the others. You connect to
> the one database and issue queries on the remote tables. There seems
> to be a contrib package for postrgres dblinks.
>
> A random-ish link I found on the matter:
> http://www.postgresonline.com/journal/index.php?/archives/44-Using-DbLink-to-access-other-PostgreSQL-Databases-and-Servers.html
>
>
> On Mar 18, 2010, at 9:20 AM, Geoffrey wrote:
>
>> We are trying to determine the best solution for a web based
>> application. We have 13 postgresql databases (separate postmaster for
>> each database) that we need to retrieve data from in order to produce
>> the web page.  This data is changing on a regular basis.  Question is:
>>
>> 1. Do we:
>>
>>     for database in 1-13;do
>>         connect database
>>         retrieve data
>>         disconnect database
>>     done
>>     display data
>>
>> 2. Or, do we have a common table for all databases that a daemon keeps
>> updated and simply pull the data from that table?
>>
>> The data that's being retrieved is changing literally by the minute.
>>
>> The cgi code is perl.
>>
>> --
>> Until later, Geoffrey
>>
>> "I predict future happiness for America if they can prevent
>> the government from wasting the labors of the people under
>> the pretense of taking care of them."
>> - Thomas Jefferson
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
Greg Freemyer
Head of EDD Tape Extraction and Processing team
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
Preservation and Forensic processing of Exchange Repositories White Paper -
<http://www.norcrossgroup.com/forms/whitepapers/tng_whitepaper_fpe.html>

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com



More information about the Ale mailing list