/whirl-matrix

whirl-framework/whirl-matrix mirror

Primary LanguageC++

Whirl-Matrix

Deterministic simulator for Whirl

Example

KV – simple replicated KV store

  • Quorum reads / writes
  • Timestamp ordering via wall clocks

Note: this implementation intentionally violates linearizability!

Use Attiya, Bar-Noy, Dolev (ABD) algorithm for linearizable behaviour:

Features

  • Determinism (concurrency, time, network, randomness)
  • Time compression
  • Linearizability checker
  • Persistence (via filesystem) and node restarts
  • Local clock skew and drift
  • Google TrueTime simulation
  • Pluggable asynchrony and fault injection strategy

Inspiration

Simulation + Fault Injection

FoundationDB

AWS

Jepsen

Paxi

Model checking

Microsoft Coyote

DSLabs

StateRight

Fuzzing

Requirements

  • x86-64
  • Linux or MacOS
  • Clang++ (>= 10.0)

Build

# Clone repo
git clone https://gitlab.com/whirl-framework/whirl-matrix.git 
cd whirl-matrix
# Generate build files
mkdir build && cd build
cmake -DWHIRL_MATRIX_EXAMPLES=ON ..
# Build kv example
make whirl_example_kv
# Run kv example
# --det - run determinism check
# --sims - number of simulations to run
./examples/kv/whirl_example_kv --det --sims 12345