As we were talking about this on IRC, I mentioned something that I might not have fully explained. In order to avoid the forking overhead, you could instead have one -- or maybe one for each user? The details aren't as important as the concept -- persistant perl executable that is chrooted, secured, etc. You could hand this process various bits of code, which it would then execute and return whatever needs to be returned.

This is all within the realm of standard IPC. You'd have to work out some sort of protocol, consider concurrency issues, etc. I wouldn't be surprised if there are already CPAN modules to take care of some of the work for you, but I don't know of any off the top of my head. This all adds complexity, but the overhead gain may be a net win. You'd have to experiment to be sure.

HTH


In reply to Re: Perlmonks Mush, revisited (Perl as as scripting language) by revdiablo
in thread Perlmonks Mush, revisited (Perl as as scripting language) by BUU

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.