Sharing Database Connection Among Different CGI scripts writen in different languages

Поиск
Список
Период
Сортировка
От Alexey V. Meledin
Тема Sharing Database Connection Among Different CGI scripts writen in different languages
Дата
Msg-id 7532.000222@webclub.ru
обсуждение исходный текст
Ответ на RE: [INTERFACES] JDBC - Numeric & Decimal handling in 6.5.3?  (Peter Mount <petermount@it.maidstone.gov.uk>)
Список pgsql-interfaces
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>>>>




В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tom Rogie
Дата:
Сообщение: pgadmin on win9x
Следующее
От: "Alexey V. Meledin"
Дата:
Сообщение: Sharing Database Connection Among Different CGI scripts writen in different languages