multi-paxos-example icon indicating copy to clipboard operation
multi-paxos-example copied to clipboard

another two more questions. : )

Open qidaneix opened this issue 9 years ago • 1 comments

first, where a value is judged to confirm in your code? and, if one of the servers certain a value is confirmed, how the other servers know? By the listener? Could you tell me where is it in you code? Thx!

qidaneix avatar Nov 02 '16 15:11 qidaneix

A value is confirmed when the Paxos instance associated with that value comes to a resolution. That happens in composable_paxos.Learner.receive_accepted(). As to how the other servers know, they'll either see the same set of acceptance messages and come to the same conclusion via that method call or they'll have to "catch up" in some way by learning the result from a peer. That mechanism is implemented by one of the strategy/mixin classes. There is no official way to do it so you can come up with whatever approach makes sense for your application. The sync_strategy module implements a really simple mechanism that just queries peers every 10 seconds to see if they've fallen behind.

On Wed, Nov 2, 2016 at 10:31 AM, 肖金 [email protected] wrote:

first, where a value is judged to confirm in your code? and, if one of the servers certain a value is confirmed, how the other servers know? By the listener? Could you tell me where is it in you code? Thx!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cocagne/multi-paxos-example/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrLfB6PFzmQ_r7hj8jwMqg2ODpUNT8Fks5q6KzqgaJpZM4KnYWm .

cocagne avatar Nov 02 '16 15:11 cocagne