Hi,
I have the question regarding the usage of
the DBI.
The situation is as follows:
We are working on the telecom system that handles phone
calls.
Every call is served by a separate perl script
process.
The process is started when a call arrives at the system
and dies when the call finishes.
There can be hundreds and thousands (1-2 thousands)
calls (script processes)
in the system working simultaneously.
Perl script should have easy and fast access to the
database (we use ORACLE).
For the moment the architecture of the system is as
follows:
perl script process -> Data Access Server ->
ORACLE.
(request is passed to the Data Access Server as simple
string and parsed by it).
Data Server has persistent connection to the Oracle and
is shared by the scripts.
I am going to make some optimizations and change the
system such way that script
directly works with the database by mean of the DBI
interface, i.e.:
perl script process -> ORACLE.
However there is the problem here: creating and removal
of database connections - it is _expensive_
task.
Suppose that algo should be as follows:
1. There is a server (or some script) that
creates pool of connections at the startup.
this server (so named 'Connection
pool server') is always operational.
2. when call handling script starts it requests
already created connection from the
Connection Pool Server and uses the
connection.
3. when call handling script finishes connection
returns to the pool.
So,
the questions are as follows:
1. Is it possible to create connection in DBI, store in the file or in
the memory and pass it to
another perl script that can use it ?
2. If it is then how can it be accompished ? Can you point me some
starting points regarding this task ?
------------------------- Best regards, Ildar Gabdulline Project
Manager, STELT Telecom mailto : [EMAIL PROTECTED] WWW : www.realeast.ru
|