Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Ok, technically you are right, that is good answer to my question.
Usually in my case messages are small and "rare".
i.e. there is on master process, which receives messages from child processes. And select() loop in master process. But when master determines that there is the message from some child, it tries to read full message, without trying to multiplex between two childs and reading message from both at time.
So, after select() told filehandle is readable, I read whole message from child, and during that process do not select() other handles. Child process (tries) to write whole message at once and does not do heavy job in between. It's also a pipe, i.e. on localhost.
Even if there is 100 children, and they do actual heavy job, and send 100-bytes message to master once a second, it's just 100 messages perl second.
That approach of course, is not good when you're writing thing like http proxy (like nginx) with slow clients, when multiplexing between clients directly affects performance.
So for things like http proxies (like nginx) there should be more complicated solution.

In reply to Re^2: sysread/syswrite wrappers (select) by vsespb
in thread sysread/syswrite wrappers by vsespb

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (4)
    As of 2021-01-28 06:07 GMT
    Find Nodes?
      Voting Booth?