Tanalis has asked for the wisdom of the Perl Monks concerning the following question:
While I'm aware that this is something that's been discussed once or twice before, the node's I've managed to uncover so far haven't taken the tack on this that I expected them to, so I'm posting anew.
I'm in the process of designing and implementing a simple database accessor, capable of performing either a pre-defined or arbitrary (read: user specified) query on a database, rolling the results up in XML, and passing this data back to a client script.
For academic reasons, I am looking at setting this accessor up as a web service, using a simple SOAP interface to allow requests to be sent from (not necessarily Perl) clients to the accessor.
Again for academic reasons, I would like to set up a simple pool of database connections, allowing clients to obtain a connection for the duration of their session. Is this as simple as creating an array of connections, and simply assigning database handles as requests come in, or is there more to it?
Moreover, does anyone have experience creating such a pool in Perl, and, if so, what pitfalls did you encounter? I'm aware that connection pools can be (fairly) easily implemented in "other" languages (I've looked primarily at Java): would I be better to write this part of the project in that over Perl?
Any advice is more than welcome.
Thanks in advance.
-- Foxcub
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Database Connection Pools with Perl
by stvn (Monsignor) on Jan 23, 2004 at 15:49 UTC | |
|
Re: Database Connection Pools with Perl
by mpeppler (Vicar) on Jan 23, 2004 at 16:02 UTC | |
by Anonymous Monk on Oct 15, 2008 at 21:28 UTC | |
by Anonymous Monk on Oct 16, 2008 at 12:30 UTC | |
|
Re: Database Connection Pools with Perl
by Roger (Parson) on Jan 23, 2004 at 13:37 UTC | |
|
Re: Database Connection Pools with Perl
by Abigail-II (Bishop) on Jan 23, 2004 at 13:22 UTC |