in reply to Re: Rapid inter-machine communication on internal network
in thread Rapid inter-machine communication on internal network

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.

  • Comment on Re^2: Rapid inter-machine communication on internal network