1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Guides to embedding a replica correctly, one topic per chapter.
//!
//! Read [`driving`] first: it is the contract every other chapter builds on.
//!
//! | Chapter | Read it to |
//! |---|---|
//! | [`driving`] | write the event loop: calls, actions, persist-before-send, timers |
//! | [`durability`] | store records and restart safely |
//! | [`snapshots`] | bound the log with application snapshots; catch up from a peer's |
//! | [`reads`] | serve linearizable reads |
//! | [`membership`] | choose the leader, add and remove replicas |
//! | [`tuning`] | set limits and timers, for LANs and wide-area clusters |
//! | [`protocol`] | understand what the replica is doing (QuePaxa in brief) |
//!
//! The code in these chapters runs as tests. Complete programs live in the crate's
//! `examples/` directory (`cargo run -p quepaxa --example cluster`, `restart`,
//! `membership`).