XP is just a number | |
PerlMonks |
Database Connection Pools with Perlby Tanalis (Curate) |
on Jan 23, 2004 at 13:15 UTC ( [id://323546]=perlquestion: print w/replies, xml ) | Need Help?? |
Tanalis has asked for the wisdom of the Perl Monks concerning the following question:
Monks,
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
Back to
Seekers of Perl Wisdom
|
|