PaxosLike

Trait PaxosLike 

Source
pub trait PaxosLike<'a>: Sized {
    type PaxosIn: 'a;
    type PaxosLog: 'a;
    type PaxosOut: 'a;
    type Ballot: Clone + Ord + Debug + Serialize + DeserializeOwned;

    // Required methods
    fn payload_recipients(&self) -> &Cluster<'a, Self::PaxosIn>;
    fn log_stores(&self) -> &Cluster<'a, Self::PaxosLog>;
    fn get_recipient_from_ballot<L: Location<'a>>(
        ballot: Optional<Self::Ballot, L, Unbounded>,
    ) -> Optional<MemberId<Self::PaxosIn>, L, Unbounded>;
    fn build<P: PaxosPayload>(
        self,
        payload_generator: impl FnOnce(Stream<Self::Ballot, Cluster<'a, Self::PaxosIn>, Unbounded>) -> Stream<P, Cluster<'a, Self::PaxosIn>, Unbounded>,
        checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
        nondet_leader: NonDet,
        nondet_commit: NonDet,
    ) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>;

    // Provided method
    fn with_client<C: 'a, P: PaxosPayload>(
        self,
        clients: &Cluster<'a, C>,
        payloads: Stream<P, Cluster<'a, C>, Unbounded>,
        checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
        nondet_commit: NonDet,
        nondet_order: NonDet,
    ) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder> { ... }
}

Required Associated Types§

Source

type PaxosIn: 'a

The nodes that receive inputs in Paxos. Usually the proposers.

Source

type PaxosLog: 'a

The nodes that store logs in Paxos. Usually the acceptors.

Source

type PaxosOut: 'a

The nodes that output the results of Paxos. Proposers in Paxos, Proxy leaders in Compartmentalized Paxos.

Source

type Ballot: Clone + Ord + Debug + Serialize + DeserializeOwned

Required Methods§

Source

fn payload_recipients(&self) -> &Cluster<'a, Self::PaxosIn>

Source

fn log_stores(&self) -> &Cluster<'a, Self::PaxosLog>

Source

fn get_recipient_from_ballot<L: Location<'a>>( ballot: Optional<Self::Ballot, L, Unbounded>, ) -> Optional<MemberId<Self::PaxosIn>, L, Unbounded>

Source

fn build<P: PaxosPayload>( self, payload_generator: impl FnOnce(Stream<Self::Ballot, Cluster<'a, Self::PaxosIn>, Unbounded>) -> Stream<P, Cluster<'a, Self::PaxosIn>, Unbounded>, checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>, nondet_leader: NonDet, nondet_commit: NonDet, ) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>

§Non-Determinism

During leader-reelection, the latest known leader may be stale, which may result in non-deterministic dropping of payloads.

Provided Methods§

Source

fn with_client<C: 'a, P: PaxosPayload>( self, clients: &Cluster<'a, C>, payloads: Stream<P, Cluster<'a, C>, Unbounded>, checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>, nondet_commit: NonDet, nondet_order: NonDet, ) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>

§Non-Determinism

During leader-reelection, the latest known leader may be stale, which may result in non-deterministic dropping of payloads. Also, payloads across clients will be arbitrarily interleaved as they arrive at the leader.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§