Skip to main content

Random seeds and state machines: An approach to deterministic simulation testing in Rust

UB2.252A (Lameere) | Day 2 | 16:00 - 16:25 | Speakers: Frederic Branczyk

Random seeds and state machines: An approach to deterministic simulation testing in Rust
A picture of a devroom at FOSDEM 2024
Open in browser

Notes

Abstract

Deterministic simulation testing (DST) is a method that explores as many random execution paths of a system as possible, injects random failures, and lets developers reproduce the exact same execution path on failure given an initial random seed. This testing approach shakes out many difficult to find bugs before they reach production and greatly increases developer confidence in system correctness when making new changes.

DST was first popularized by the FoundationDB team, and is slowly finding its way into the testing arsenal of many products like TigerBeetle, Resonate, and more recently, Turso’s rewrite of SQLLite in Rust. This talk will cover how we implemented DST of our distributed storage system at Polar Signals by modelling our core components as state machines and why this was the right choice for us over other approaches that use deterministic async runtimes (e.g. https://github.com/madsim-rs/madsim).

Come learn more about DST and how it can help you write better and more resilient software!


Notice: The placeholder video image is licensed under CC BY-SA 4.0. The original image can be found hereChanges made to the image are: Cropped the image to a new ratio, part of the image was cut off.