Separate Protocol Logic from I/O for Deterministic Tests
summary
Separating protocol logic from I/O produces a pure state machine that accepts events and returns desired actions, enabling fast deterministic tests by driving a simulated environment. Implementation uses a traits-based interface, event heaps and virtual time to run a 2,000-node cluster simulation without threads, injects seeded randomness, and measures per-message latencies and delivery counts. The replacement for in-process sockets is a queued event loop that reproduces failures and reboots; protocol tests pass, but end-to-end integration still requires real I/O.
AI-written summary · about
chapters (9)
- 0:00Introduction to talk
- 1:21Challenges in testing distributed systems
- 3:49Protocol logic simplicity and goals
- 5:55Separating protocol logic from I/O
- 9:06Implementing the sans-IO pattern
- 11:32Testing with virtual time
- 14:39Simulating failures in tests
- 16:45Benefits and limitations
- 18:32Summary and sans-IO approach
