Another weekend, another weekend read, this time all about Deterministic Simulation Testing
My book Thinking in Distributed Systems is now available. 12 chapters, full of mental models, diagrams, illustrations, and examples, all about distributed systems.
In this issue of the weekend read, join me and Joran Dirk Greef, the Founder & CEO of Tigerbeetle, as we embark on a journey through the intricacies of Deterministic Simulation Testing. But before we dive into the heart of Deterministic Simulation Testing, let's lay the groundwork with a crucial concept: Determinism.
Computational Model
In formal systems, we encounter the Process, crafted from actions, the basic units of execution, and combinators, which weave actions and processes into more intricate processes.
This recursive definition of processes enables an elegant definition of a system: A System is the concurrent composition of processes and therefore is itself a process.
A Trace represents the execution of a process, defined as a sequence of actions that the process undertakes under the evaluation rules of a Runtime.
Process
P = 0 | a | (a • P) | (P ∨ P) | (P | P)
System
S = P₁ | P ₂ | …
Trace
t = ⟨aₙ⟩
Deterministic & Non-Deterministic
From here, we can define the execution space of a System S in its initial State σ under the rules of a Runtime R. In other words, Traces T is a function that maps a System S and initial state σ evaluated under the transition rules of a Runtime R to the set of possible execution traces.
This enables us to succinctly define a deterministic and non-deterministic system:
A System S is deterministic under Runtime R if for every State σ the cardinality of its trace set is one.
And conversely
A System S is non-deterministic under Runtime R if for every State σ the cardinality of its trace set is larger than one.
With this groundwork in determinism, we're not just ready—we're exceptionally equipped to dive deep into our discussion on Deterministic Simulation Testing.
Happy Watching