in reply to Re: Distributed agreement woes
in thread Distributed agreement woes

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.

Replies are listed 'Best First'.
Re^3: Distributed agreement woes
by ikegami (Patriarch) on Jul 02, 2010 at 22:41 UTC
    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.
        If this is like a version control application, git may be an answer - it is distributed, supports replication, and has notification on update.

        You may be able to plagiarize parts of it to build your system.

             Syntactic sugar causes cancer of the semicolon.        --Alan Perlis

        But how does a local host know that all remote hosts have completed making their local copies of the file?

        A non-existent file is different than an existent file. Are your specs incorrect?