Discrete-event simulator for message-driven nodes, a network model (delay, loss, partitions), and Raft / hybrid Raft consensus over a replicated key–value store. Used for reproducible chaos-style experiments and metrics.
This project was written in barely C++.
- C++20 compiler (Clang or GCC)
- CMake >= 3.14
- Conan (Catch2 is declared in
conanfile.txt), or Catch2 installed sofind_package(Catch2 CONFIG)works
From the repository root:
mkdir -p build && cd build
conan install .. --output-folder=. --build=missing
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .| Path | Role |
|---|---|
src/core/ |
MDS core: events, EventManager, NodeID |
src/simulation/ |
SimulationScenario, Network, timers, SimulationContext |
kv/ |
Local KVStore template |
raft/ |
Classic Raft node |
hybrid_raft/ |
Hybrid Raft with log-backoff / conflict hints |
tests/ |
Catch2 tests (test_core, test_simulation, test_raft, test_mc) |
tests/mc/ |
Monkey chaos scenarios, quorum schedules, metrics hooks |
tests/metrics/ |
RaftMcMetricsCollector, BuildRaftMcSimulation |
examples/ |
Small demos (main_example, raft_example) |
Libraries: distsysenv_core, distsysenv_simulation, distsysenv_raft, distsysenv_hybrid_raft.
Executables:
test_core,test_simulation,test_raft— unit / integration teststest_mc- metrics comparsion testmain_example,raft_example— examples
./test_core
./test_simulation
./test_raft
./test_mc./main_example
./raft_exampleCatch2 runs as normal binaries.
mc_seed_sweep <first_seed> <count> [jitter|loss|both]
Example:
./mc_seed_sweep 1 50 both > sweep.csvThe term paper live under term_paper/.