Crate agreed[][src]

Expand description

Agreed

Fork of async-raft, the Tokio-based Rust implementation of the Raft distributed consensus protocol.

Continuous Integration Crates.io docs.rs License


Agreed is an implementation of the Raft consensus protocol in Rust, intented to serve as a basis for distributed data systems.

Getting Started

If you want to get started with building applications on top of Agreed, then checkout out The Agreed Guide. Afterwards, feel free to jump into the documentation.

Features

  • Fully asynchronous, built on top of Tokio.
  • Pluggable storage and network layer.
  • Log compaction with snapshots and snapshot streaming.
  • Fully pipelined and batched log replication with congestion control.
  • Single-node cluster membership change operations.
  • Non-Voter nodes for data replication/change data capture.
  • Instrumented with tracing.

Original Author

This project, including the guide, was originally written by Anthony Dodd as async-raft. Huge props to him! :rocket:

License

Agreed is licensed under the terms of the MIT License or the Apache License 2.0, at your choosing.


NOTE: the appearance of the “section” symbols § throughout this project are references to specific sections of the Raft spec.

Re-exports

pub use crate::config::CatchUpCancellationPolicy;
pub use crate::config::Config;
pub use crate::config::ConfigBuilder;
pub use crate::config::SnapshotPolicy;
pub use crate::error::ChangeConfigError;
pub use crate::error::ClientWriteError;
pub use crate::error::ConfigError;
pub use crate::error::InitializeError;
pub use crate::error::RaftError;
pub use crate::metrics::RaftMetrics;
pub use crate::network::RaftNetwork;
pub use crate::raft::Raft;
pub use crate::storage::RaftStorage;
pub use async_trait;

Modules

config

Raft runtime configuration.

error

Error types exposed by this crate.

metrics

Raft metrics for observability.

network

The Raft network interface.

raft

Public Raft interface and data types.

storage

The Raft storage interface and data types.

Enums

State

All possible states of a Raft node.

Traits

AppData

A trait defining application specific data.

AppDataResponse

A trait defining application specific response data.

Type Definitions

NodeId

A Raft node’s ID.