Pool of database connections

A

Aaron Couts

I'm working on a network server written entirely in perl, and it's functioning,
in a way, as a proxy server for an Oracle database. Right now each new
socket connection forks off a process, and that new process creates a brand
new database connection. This is kind of slow and dumb, so I have a few
questions.

1. Are there any tools out there that are custom-made for this? Something
like Apache::DBI would be great, but I can't run the server under Apache.
Also I need to use forks rather than threads.

2. I was thinking of using forks::shared to manage a pool of connections, but
it looks like it doesn't work with database handles. Can anyone confirm this?

Thanks,
Aaron
 
X

xhoster

Aaron Couts said:
I'm working on a network server written entirely in perl, and it's
functioning, in a way, as a proxy server for an Oracle database. Right
now each new socket connection forks off a process, and that new process
creates a brand new database connection. This is kind of slow and dumb,
so I have a few questions.

Has it's slowness and dumbness been investigated and proven to be an actual
bottleneck in the system, or is merely an abstractly theoretical slowness
and dumbness?
1. Are there any tools out there that are custom-made for this?
Something like Apache::DBI would be great, but I can't run the server
under Apache. Also I need to use forks rather than threads.

I'm not aware of any meeting those requirements as stated. Could you make
the server pre-forking? (And then each pre-forked process would get a dbh
connection at startup and then handle network requests sequentially.)
2. I was thinking of using forks::shared to manage a pool of connections,
but it looks like it doesn't work with database handles. Can anyone
confirm this?

I can't confirm it specifically with forks::shared, but I think the
underlying mechanism to pass serialized data over a socket, which mechanism
I couldn't make work with oracle connections.

Xho
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,474
Latest member
AntoniaDea

Latest Threads

Top