<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Sounds like a job for DBD::Proxy or DBD::Gofer, not that I've ever
used them, and I have no idea whether they would play nice with DBIC
-- the DBIC folks would have a better grasp on that question. That
would leave the Catalyst parts unchanged apart from configuration,
which would be a good thing architecturally. <br>
<br>
--S<br>
<br>
<div class="moz-signature"><span style="color: rgb(102, 0, 0);">Stuart
Watt<br>
ARM Product Developer<br>
Information Balance</span></div>
<br>
On 9/8/2010 10:54 AM, Simon Miner wrote:
<blockquote
cite="mid:AANLkTim3tx1trYS59p2Kbs1aQZ5Ht2uMA=UCgj0-2_ug@mail.gmail.com"
type="cite">Thanks for the responses,<br>
<br>
Jason, I don't think reducing the number of database connections
will hurt responsiveness. Even though there are 3 separate
Catalyst apps, each HTTP request will only involve one of them
(since they all run out of the same web server), so there should
never be contention between the apps for the shared database
connection. Does this make sense?<br>
<br>
Tom and Nicholas, I wish this was premature optimization, but my
organization has experienced serious performance issues in the
past related to multiple (Oracle) database connections per HTTP
server process. Extra Oracle connections are expensive to
maintain, particularly on the database server, and so we've tried
to ensure that a single server process only has a single
connection to a given database (since that's all it should need at
any given time).<br>
<br>
I've attached a Devel::NYTProf screenshot for one of the server
processes I profiled this morning. Looks like it confirms the
multiple database connections.<br>
<br>
So back to initial question -- How do I update the models of my
three Catalyst apps to share a single Oracle database connection?<br>
<br>
Thanks again. I really appreciate your feedback.<br>
<br>
Simon<br>
<br>
<div class="gmail_quote">On Tue, Sep 7, 2010 at 11:40 PM, Nicholas
Wehr <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:catalyst@bionikchickens.com">catalyst@bionikchickens.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">I'm with Tom on this one. Unless you've
narrowed all optimization efforts and this is all you have
left - it could be worth a try.. but as Jason points out, you
may not gain a thing. I'd recommend profiling your code and
tracking down performance issues from that base level. Please
post your results - I've very curious!<br>
<font color="#888888">
<br>
-nw</font>
<div>
<div class="h5"><br>
<br>
<div class="gmail_quote">On Tue, Sep 7, 2010 at 7:21 PM,
Tomas Doran <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:bobtfish@bobtfish.net" target="_blank">bobtfish@bobtfish.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt
0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div><br>
On 7 Sep 2010, at 18:59, Simon Miner wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt
0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
All three of these apps run under a single Apache
1.3.42/mod_perl 1.31 server.<br>
</blockquote>
<br>
</div>
Wow, mod_perl 1.... Ok then :)
<div><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt
0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
It appears that each server process creates a
unique database connection variable for each of
these apps. Although these database connections
get reused from request to request, I would like
to make things even more efficient by having a
single database connection variable per server
process which gets shared across all 3 Catalyst
apps.<br>
</blockquote>
<br>
</div>
Why do you think that this will help or affect
anything?<br>
<br>
I.e. is this not premature optimisation?<br>
<br>
Cheers<br>
t0m
<div>
<div><br>
<br>
<br>
_______________________________________________<br>
List: <a moz-do-not-send="true"
href="mailto:Catalyst@lists.scsys.co.uk"
target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a moz-do-not-send="true"
href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst"
target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a moz-do-not-send="true"
href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/"
target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a moz-do-not-send="true"
href="http://dev.catalyst.perl.org/"
target="_blank">http://dev.catalyst.perl.org/</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
<br>
_______________________________________________<br>
List: <a moz-do-not-send="true"
href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a moz-do-not-send="true"
href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst"
target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a moz-do-not-send="true"
href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/"
target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a moz-do-not-send="true"
href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
-- Simon<br>
<br>
--
<br>
This message was scanned by ESVA and is believed to be clean.
<br>
<a moz-do-not-send="true"
href="http://antispam.infobal.com/cgi-bin/learn-msg.cgi?id=7897728072.B3B1D">Click
here to report this message as spam.</a>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
List: <a class="moz-txt-link-abbreviated" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a>
Listinfo: <a class="moz-txt-link-freetext" href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a>
Searchable archive: <a class="moz-txt-link-freetext" href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a>
Dev site: <a class="moz-txt-link-freetext" href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</a>
</pre>
</blockquote>
</body>
</html>