From: Alexey V. Meledin <avm@webclub.ru>
To: pgsql-interfaces@postgresql.org
Subject: Sharing Database Connection Among Different CGI scripts writen in different languages
Date: Tue, 22 Feb 2000 12:46:21 +0300
Message-ID: <7532.000222@webclub.ru> (raw)
In-Reply-To: <1B3D5E532D18D311861A00600865478C70C232@exchange1.nt.maidstone.gov.uk>
References: <1B3D5E532D18D311861A00600865478C70C232@exchange1.nt.maidstone.gov.uk>
Hi!
I have 2 CGI scripts. Each script makes some queries to PostgreSQL and
returns html code as a result .
Simple example:
1-st CGI returns: "Hello, Anny!" (Anny is choosen from DataBase)
2-nd CGI returns: "There is 3 messages for you!" (nu,ber of messages
is choosen from Database)
Scripts can run separately each from other.
Suppose, that I want to call 2-nd script from the first via HTTP or
fork+execv+pipe.
I receive: "Hello, Anny! There is 3 messages for you!"
All OK, but I have two separated queries and two Backends started.
It's not good, because I don't need any concurrency :(
How can I optimize such situation?
I see:
1. Share Database conection among two scripts. Can I do it?
2. Write "proxy" daemon to execute queries. Is it possible?
3. Use Application Servers and so either (can't use them and any other
transaction mechanizm)
Thenks, Alexey V. Meledin
InterForge Developers Group, Saint-Petersburg
look_to: <www.etcompany.ru><www.businessweb.ru>
<www.inplan.spb.ru><www.pia.ru>>>>>>>>>>>>>>>>>
mail_to: <avm@webclub.ru><nick_as: <cureman>>>>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: avm@webclub.ru
Subject: Re: Sharing Database Connection Among Different CGI scripts writen in different languages
In-Reply-To: <7532.000222@webclub.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox