Algorithm::Paxos::Role::Proposer - A Proposer role for the Paxos algorithm
version 0.001
package MyApp::PaxosBasic; use Moose; with qw(Algorithm::Paxos::Role::Proposer); 1; __END__
From Wikipedia
A Proposer advocates a client request, attempting to convince the Acceptors to agree on it, and acting as a coordinator to move the protocol forward when conflicts occur.
Returns a list of the acceptors.
Returns count of the number of acceptors.
Takes a list of IDs and sees if they meet a quorum.
Takes a list of replies and returns the highest proposal id from the list.
Generates a new proposal id. The default implementation is an increasing integer (literally $i++).
$i++
Propose is the main interface between clients and the Paxos cluster/node. Propose takes a single value (the proposal) and returns the ID that is assigned to that proposal. If the proposal fails an exception is thrown.
Chris Prather <chris@prather.org>
This software is copyright (c) 2012 by Chris Prather.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Algorithm::Paxos, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Algorithm::Paxos
CPAN shell
perl -MCPAN -e shell install Algorithm::Paxos
For more information on module installation, please visit the detailed CPAN module installation guide.