3 ms·
Why doesn't each client pick a random number and then send it to each other client? When you receive a message add it to your total. Once everyone gets all the
by pg_bot 6y ago
Why doesn't each client pick a random number and then send it to each other client? When you receive a message add it to your total. Once everyone gets all the messages they all have the same number.
- lostcolony 6y agoNot sure exactly what you're looking to solve with that proposal, but, I can see one obvious question - how do you know if you've heard from a node or not? Until I hear from it I don't know its number. With a quorum based election, I only need to hear from n/2+1 nodes. I don't have to know anything about the nodes themselves, only the number needed to form a quorum. With random numbers, I'd need to hear from every member to know if I've reached consensus or not. That, or I'd need a perfectly partitioned network (i.e., A and B can talk, but neither can talk to C. If A can talk to B, and B can talk to C, but C can not talk to A, at least when trying to make a decision, no decision can be reached)