I have always felt that polling ("pull") solutions a last resort whenever a semaphore or other message system ("push") solution can be used. Pull solutions pretty much always use up more CPU time and RAM as you have to be always running, looking for something periodically. Conversely, a push solution means we only load what we need to load, when it is demanded of us, and we use literally no CPU time until that time.

Thus, I much more liked the ssh solution above than using a disk like this. If you are going to write a daemon anyway, have it listen on a port, and wait for communication on that port. Then it can do stuff based on what it receives there. This will mean more RAM used (but it can be swapped out if it's not active very much), but no CPU time (the OS will leave your app asleep until something comes in on the designated port). Especially in perl - perl makes writing client/server TCP apps very easy, not like C. So take advantage of that.


In reply to Re^2: Python from Perl, Perl/Win from Perl/*nix by Tanktalus
in thread Python from Perl, Perl/Win from Perl/*nix by punkish

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.