This directory contains example applications demonstrating different implementation approaches for OpenRaft components.
- Log: LogStore implementation for storing raft logs
- State Machine: StateMachine implementation for application state
- RaftNetwork Impl: Transport protocol and client library used
- RaftNetwork: Interface version (RaftNetwork vs RaftNetworkV2)
- Client: HTTP/gRPC client library for application requests
- Server: Web framework for handling incoming requests
- Special Features: Unique characteristics of each example
| Example | Log | State Machine | RaftNetwork Impl | RaftNetwork | Client | Server | Special Features |
|---|---|---|---|---|---|---|---|
| raft-kv-memstore | log-mem | sm-mem | HTTP/reqwest | RaftNetwork | reqwest | actix-web | Basic example |
| raft-kv-fjall | [fjall] | [fjall] | HTTP/reqwest(network-v1) | RaftNetwork | reqwest | actix-web | Persistent storage |
| raft-kv-rocksdb | rocksstore | rocksstore | HTTP/reqwest(network-v1) | RaftNetwork | reqwest | actix-web | Persistent storage |
| raft-kv-memstore-network-v2 | log-mem | sm-mem | HTTP/reqwest | RaftNetworkV2 | reqwest | actix-web | Network V2 interface |
| multi-raft-kv | log-mem | sm-mem | HTTP/channel | GroupRouter | channel | in-memory | Multi-Raft groups |
| raft-kv-memstore-grpc | log-mem | in-memory | gRPC/tonic | RaftNetwork | tonic | tonic | gRPC transport |
| raft-kv-memstore-single-threaded | log-mem | in-memory | HTTP/reqwest | RaftNetwork | reqwest | actix-web | Single-threaded runtime |
| raft-kv-memstore-opendal-snapshot-data | log-mem | in-memory+OpenDAL | HTTP/reqwest | RaftNetwork | reqwest | actix-web | OpenDAL snapshot storage |
- log-mem - In-memory Raft Log Store using
std::collections::BTreeMap - sm-mem - In-memory KV State Machine implementation
- rocksstore - RocksDB-based persistent storage using
rocksdbcrate
The following symbolic links are provided for backward compatibility:
- network-v1 - HTTP-based RaftNetwork interface V1 using
reqwestcrate