Crates.io | viewstamped-replication |
lib.rs | viewstamped-replication |
version | 0.9.0 |
source | src |
created_at | 2024-01-04 17:04:12.610687+00 |
updated_at | 2024-03-10 01:18:27.14369+00 |
description | A Rust-based implementation of the Viewstamped Replication consensus protocol. |
homepage | https://github.com/misalcedo/vr |
repository | https://github.com/misalcedo/vr |
max_upload_size | |
id | 1088834 |
size | 120,942 |
A Rust-based implementation of the viewstamped replication consensus protocol.
The basic protocol assumes a single concurrent request per client. Client applications can achieve higher concurrency by utilizing multiple client identifiers for a single client application instance.
Supports non-determinism by querying the service from the primary for a predicted value and passing that value on
prepare to all replicas.
Currently, there is no support for other solutions mentioned in the literature such as sending a predict message,
waiting for f
responses and deterministically merging the values.
Supports log compaction by regularly taking checkpoints of the service state to be durably stored. A service must be restore-able from a checkpoint. Once a large enough suffix of checkpoints exists, the log may be compacted to remove all operations included in the last checkpoint before the suffix.
For example, imagine a configuration that takes a checkpoint every 5 minutes and keeps the last 3 checkpoints. The log will be compacted on the 4th checkpoint and any operations whose application state is reflected in 1st checkpoint will be removed from the log.
A simulation of the protocol using async tasks and channels is included in the examples.
cargo run --example simulation
GetState
message for a newer operation than is in
its log. For now, we drop the message.f
backups.