assume distributed systems network. Each system measures a value. There is a correct decision to be made in consensus by all systems depending on all values. communication links may drop. Is there a voting and synchronization algorithm for this case?
-
How many mutually exclusive choices are there to choose between? Is this a "fire the nukes" type decision, or "name your favorite child actor?" – dwn Jan 10 '15 at 17:06
-
Hi. All systems are in some state (e.g., A). Each system may detect a problem and suggest to change state from current (e.g., A) to the other (e.g., B). Other correct systems may answer they agree or think it is a bad idea. Based on weight of each system and their responses all system should reach consensus whether to change state or not and act upon it. System is asynchronous but we can assume that we can use time outs and achieve acceptable results. We can simplify by assuming crash failures (or communication failures). There is possibility that 2 systems will propose different states. – beni Jan 13 '15 at 00:38
2 Answers
Examples of voting algorithm in distributed systems:
- Bully algorithm (http://en.wikipedia.org/wiki/Bully_algorithm)
- Chang and Roberts algorithm (http://en.wikipedia.org/wiki/Chang_and_Roberts_algorithm)

- 1,736
- 1
- 13
- 21
I have solved a similar problem. It is a failure detection scheme, so I'll describe it in those terms instead of the generic terms of the OP.
Clients ping our servers periodically, and after some time of no pings the client is considered dead or behind a network partition. (They are the same to us.) Because the clients can pick an arbitrary server to connect to, different servers have different views on if the client is dead or alive.
Our servers use a gossip/epidemic protocol to exchange their view of the clients with each other. This is where the logic comes that one server's data is better than another's. The nice thing about an epidemic protocol is that it is light on the network, yet will still converge.
When a decision is made (in our case, declaring that a client is dead) any of the servers has a tolerably up-to-date table of all the client's heartbeats. Any server is free to make the decision, which we do via a consensus protocol amongst themselves (Paxos or Raft). Note that the server may be wrong with its decision—but it's unlikely that it doesn't have a somewhat up-to-date table but still run a successful Paxos round.

- 10,386
- 5
- 51
- 74
-
thank you Michael. I will study your answer and hopefully it will make good sense for my problem. – beni Feb 18 '15 at 13:27