Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bringing Paxos Consensus in Multi-agent Systems Andrei Mocanu Costin Bădică University of Craiova.

Similar presentations


Presentation on theme: "Bringing Paxos Consensus in Multi-agent Systems Andrei Mocanu Costin Bădică University of Craiova."— Presentation transcript:

1 Bringing Paxos Consensus in Multi-agent Systems Andrei Mocanu Costin Bădică University of Craiova

2 What is consensus?  Agreement No two processes decide differently  Termination Every correct process eventually decides  Validity The value that is decided must be among the values proposed by the processes

3 Why is consensus important?  Ensuring processes agree - fundamental problem in Distributed Computing  Applications in other problems: leader election state machine replication atomic broadcast

4 Why is consensus hard?  Fischer-Lynch-Paterson Result impossible to solve consensus in an asynchronous system in the presence of even a single failure.  No deterministic fault-tolerant consensus protocol can guarantee progress in an asynchronous network!

5 Paxos Algorithm  Developed in the 1980’s by Leslie Lamport, but paper rejected  Eventually published in 1998 and simplified in 2001  Used in practice: Google Chubby and Megastore Microsoft Autopilot Apache Hadoop Zookeeper

6 Paxos Algorithm  Safety Properties value chosen is from proposed values only one value is chosen value is learned only if chosen  Paxos will eventually succeed if a majority of participants is reachable processes know how to generate values

7 Paxos Roles  Client process that makes the request  Acceptor represent the fault tolerant “memory” organized in groups called Quorums any message sent to an Acceptor must be sent to a Quorum of Acceptors any message received from an Acceptor is ignored unless sent from each Acceptor in a Quorum

8 Paxos Roles  Proposer acts on behalf of the Client tries to assemble majority of Acceptors  Leader a distinguished Proposer many processes may believe themselves Leaders, but progress is made when only one of them is chosen

9 Paxos Roles  Learner assure replication once the decision has been received from the Acceptors, they take action and send the response to the Client more may be added to increase availability

10 Paxos Phases  Phase 1a: Prepare a Proposer (the leader) makes a proposal numbered n, greater than any proposal number used by that Proposer in the past the Proposer sends a Prepare message containing n to a Quorum of Acceptors

11 Paxos Phases  Phase 1b: Promise if n is higher than proposal numbers received so far by Acceptors, then it promises to ignore future proposals <n if Acceptor had accepted proposal m<n, it will include proposal number m and value u  otherwise ignore proposal (or send NACK)

12 Paxos Phases  Phase 2a: Accept Request if Proposer receives enough promises from the Quorum, it then chooses the maximum value received from Acceptors or a value it generates if none received the Proposer sends that value to the Quorum in an Accept Request message

13 Paxos Phases  Phase 2b: Accepted if Acceptor receives Accept Request message for proposal n  then it accepts proposal if it had not promised to accept only greater numbered proposals; it registers the value of the proposal and sends an Accepted message to the Proposer and Learners  Otherwise it ignores the Accept Request message (or NACK)

14 Paxos Example

15 Paxos Role Distribution

16 Collapsing Paxos Roles

17 Discovery - JADE Yellow Pages

18 Class Structure & Dependencies

19 Dueling Proposers Scenario

20 Dueling Proposers – Experiment

21

22

23 Experimental Results Summary Configuration/Message Loss10%30%50% 3 Proposer, 5 Acceptor, 5 Learner 1.422.183.83 10 Proposer, 5 Acceptor, 5 Learner 1.472.486.36 3 Proposer, 15 Acceptor, 50 Learner 1.632.24.78

24 Conclusions  We demonstrate an implementation of Paxos using Multi-agent Systems  Leverage existing agents in the system to create fault-tolerant layer  Experimental analysis of an interesting Paxos edge case in JADE

25 Questions?


Download ppt "Bringing Paxos Consensus in Multi-agent Systems Andrei Mocanu Costin Bădică University of Craiova."

Similar presentations


Ads by Google