How does the number of bananas get updated on the nodes? Is there any calculation going on on the nodes - or just a summing of the bananas? How often do the numbers change? Do you know the number of bananas at the time the number changes?

The cost for a worker node to figure out how many bananas it has is next to nothing. So the nodes will be able to answer back on the first loop right away.

The cost for a worker node to figure out how much it should charge for a banana varies. It can be small; it can be quite substantial. There calculation is very complex.

Updates are potentially very frequent, and we have to plan as if they are occurring all the time.

This code works and is as fast as your slowest server because: You have asked all of the servers the question which takes near 0 time (assuming connection time isn't the issue).

This is cool, though the web-page thing won't work out. However, these apps are all persistent, and from what I gather we can establish enduring socket connections between them. So we can iterate over an array of existing connections instead of hostnames. Your point about blocking still applies. The amount of data transmitted between boss and worker nodes is small, so transmission time won't be an issue unless some unknown factor gets in the way and interferes with a connection. From what I read in this thread, I gather no such problem is likely to arise at the level of the internal network when using sockets (assuming that we're nowhere near network capacity).

We still need to handle the case of individual worker nodes malfunctioning, but since the first loop has a tiny cost, it can also serves as verification that everybody's present and accounted for.


In reply to Re^2: Rapid inter-machine communication on internal network by Anonymous Monk
in thread Rapid inter-machine communication on internal network 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.