in reply to Distributed agreement woes

I don't see the problem. You must already have some means of identifying the members of the network and some means of communicating with them. Include the file or a hash of the file in the request sent to the hosts, and have them reply whether their file is the same or not. If all the hosts in the network reply affirmatively, then the file is/was the same across all hosts.

Replies are listed 'Best First'.
Re^2: Distributed agreement woes
by andrew732 (Novice) on Jul 02, 2010 at 22:38 UTC
    You're assuming there is a master. This is a decentralized system made up of peers and the peers must reach an agreement among themselves, a much trickier problem than it seems at first.
      No, I didn't. Your requirement states some script wants to know if all machines are in sync. Therefore, you have a requester. That's all my method requires.
        But how does a local host know that all remote hosts have completed making their local copies of the file? Sleep until the file exists on the other host and then make sure no other host has a lock on the file? That's the kind of stuff that I don't want to code myself, especially because I need guarantees that race conditions won't arise. It's very possible that I'm overthinking all this; I was kind of just hoping someone would say something like "oh yeah, just use distributed_agreement.pm" from cpan or something like that.