More info...

The OS is Tru64 UNIX, which runs an application to execute commands on Ericsson AXE10 telephone exchanges. This application can be run as an interactive shell, have a command file piped into it, or just run a single function expressed as an argument on the UNIX command line. Unfortunately it has a startup period of 15-20 seconds, during which time it uses a large amount of system resources, making it inefficient for entering single commands.

What I am writing is a server that will prefork a number of child processes - each one will open a telnet session to localhost (using Net::Telnet) and start the command line app in interactive mode. Incoming connections will then be accepted and single commands forwarded to a free process, removing the startup delay as the application is already running.

Most commands will execute fairly quickly, but some switch functions such as repair checks and backups can take more than an hour. If all of the forked processes are busy, I would like an incoming connection to be rejected (i.e. no queueing) as a queued connection could give the user the impression that their job is being processed when actually it is just waiting.

The clients are mainly CGI scripts and cron jobs. They will all access the server through a Perl module - this module will generate the error message if it cannot open a socket. I can also then keep a log of failed connections.

JJ


In reply to Re: Re: Behaviour of 'Listen' parameter in socket for preforking server by jj808
in thread Behaviour of 'Listen' parameter in socket for preforking server by jj808

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.