Separate Protocol Logic from I/O for Deterministic Tests
summary
Explains how Corrosion’s broadcast protocol is split into a pure state machine and a small I/O trait so tests run deterministically without sockets or threads. Uses sans IO design, a binary-heap event queue and virtual time to simulate and measure delivery across 2,000 nodes, queueing timers, node failures and message drops. Tests inject randomness via seeds, replay scenarios exactly, and verify message delivery and timing; warns that integration with real I/O still needs separate end-to-end checks.
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
