This repository contains small distributed-systems examples and exercises built with the TickLoom framework. It currently includes:
- A quorum-based key-value store:
src/main/java/com/distsys/quorumkvwith tests insrc/test/java/com/distsys/quorumkv/QuorumKVTest.java - A minimal echo server/client example:
src/main/java/com/example/tickloomexample/echowith tests insrc/test/java/com/example/tickloomexample/echo/EchoClusterTest.java
TickLoom artifacts used:
- Library:
io.github.unmeshjoshi:tickloom:0.1.0-alpha.7 - Testkit:
io.github.unmeshjoshi:tickloom-testkit:0.1.0-alpha.7
Reference: TickLoom on Sonatype Central
- JDK 21+
./gradlew clean testRun a specific test class:
./gradlew test --tests com.distsys.quorumkv.QuorumKVTestIf you prefer a system Gradle:
gradle clean test- QuorumKV:
src/main/java/com/distsys/quorumkv/* - Echo example:
src/main/java/com/example/tickloomexample/echo/* - Perf utilities and tests:
src/test/java/com/example/perf/*
- We record client-observed operations using
JepsenHistoryand export EDN for analysis. ConsistencyCheckerfrom tickloom integrates Jepsen’s linearizability checker and a custom sequential-consistency checker.- Example (linearizability after heal):
src/test/java/com/distsys/quorumkv/QuorumKVJepsenTest.java- Build the history with
JepsenHistory.invoke/ok/failusingJepsenHistory.tuple(key, value) - Export EDN:
String edn = history.getEdnString() - Verify:
ConsistencyChecker.check(edn, ConsistencyChecker.ConsistencyProperty.LINEARIZABILITY, ConsistencyChecker.DataModel.REGISTER) - This mirrors the pattern in the upstream NetworkPartitionTest link
- Build the history with