OP here. Many thanks for all the responses. I was going to give more detail for what's actually going on, but in fact the question that "hippo" asked led me straight to the obvious solution to this.

As they pointed out, the Catalyst app is already running, and that really is the daemon, and all the workers we need. What's happening now is that we implement our own job queue, and the cron script simply gathers data from the job queue and fires requests into the Catalyst app. Currently, the cron script loads the entire app (because it uses some utility functions that are, um, useful), but it doesn't need to--with a small amount of rewriting, the cron script can get the info it needs, without the zillion database connections, and send everything into the main app.

When I was thinking we needed a separate daemon, I didn't stop to consider why this script itself needed to be daemonized, and in fact, there's nothing in that script that takes much overhead. I was misunderstanding my own app. Wasn't intentionally an XY question, but it seems to have ended up that way.... Thank you!


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