wize monks!

my scenario:
server#1 runs N instances of application.pl (just executeable perl files, not via apache/mod_perl)

during runtime application.pl connects to a mysql-database at server#2 and executes several INSERT statements.

this works well - as long as there are not many instances of application.pl running. but the load increases from time to time, which leads to a bottleneck because of the many connections.

upon my quest to reduce connection traffic i came up with the idea of sharing only one mysql connection between the applications (like Apache::DBI). But because i don't start the application via apache, httpd is not the mother-instance...

as far i found ResourcePool::Command::DBI::Execute, which i would like to serve to the application.pl instances in some way.

or do i need something like a deamon.pl to which the several application.pl can connect and write their insert-statements?
but how to keep the several requests seperated so that only one INSERT takes place at a time. like a buffer for several insert statements...

...hmmm...???...


can you enlighten an unworthy perl student with knowledge, please?!

In reply to how can N client.pl connect to one deamon serving mysql by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.