Any client/server architecture you fancy will handle this. Long-running server processes to avoid the on-request startup costs and listening for occasional client connections. Since it's already a Catalyst app I don't see why you wouldn't initiate the jobs via web requests. Now, having said that ...

has a very high startup overhead, thanks to a large number of database connections that have to be set up at the start of every run. It takes about 30 seconds or so before it starts to respond ... Assume there's no way to reduce the startup costs.

Mounting my high horse I will assert that there is a way to reduce the startup costs, particularly if they are just setting up a large number of database connections. These can be done in parallel and that will save stacks of time because most of the latency will be due to the network and the server side processing of the authnz and setting it all up on the far end. Everyone will have their own yardstick but I expect most will agree that 30 seconds is far too long as an init phase. A little work to refactor that init phase should pay off handsomely.


🦛


In reply to Re: Daemonizing (or otherwise speeding up) a high-overhead script? by hippo
in thread Daemonizing (or otherwise speeding up) a high-overhead script? 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.