Testing Distributed Systems with Deterministic Simulation (2014) [video]
1–9 of 9 posts
Re: Testing Distributed Systems with Deterministic Simulation (2014) [video]
#2Re: Testing Distributed Systems with Deterministic Simulation (2014) [video]
#3Re: Testing Distributed Systems with Deterministic Simulation (2014) [video]
#4So for example: the system clock needs to be replaceable with a fake, or the current time needs to be injected, or perhaps both.
Another example: Go channels. These are a real PITA to surface in a way that allows a test harness to drive them deterministically.
A while ago I built a simulator testing harness for an early version of the Knative autoscaler[0]. I eventually ran aground on the difficulty of keeping up with changes, but it may be rearchitected and repurposed to assist Kubernetes HPA development instead.
FoundationDB's approach is to pretty much bake optional determinism into the language with some macro magic. It makes me wish that were easier to do in other languages.
Re: Testing Distributed Systems with Deterministic Simulation (2014) [video]
#5My experience is that this is difficult without the system under test being designed to operate deterministically. So for example: the system clock needs to be replaceable with a fake, or the current time needs to be injected, or perhaps both. Another example: Go channels. These are a real PITA to surface in a way that allows a test harness to drive them deterministically. A while ago I built a simulator testing harn…
This also has the side benefit of artificially “speeding up time”, which is useful when many actions happen based on long timeouts.
Re: Testing Distributed Systems with Deterministic Simulation (2014) [video]
#6Re: Testing Distributed Systems with Deterministic Simulation (2014) [video]
#7My experience is that this is difficult without the system under test being designed to operate deterministically. So for example: the system clock needs to be replaceable with a fake, or the current time needs to be injected, or perhaps both. Another example: Go channels. These are a real PITA to surface in a way that allows a test harness to drive them deterministically. A while ago I built a simulator testing harn…
In the FDB simulator case, every event has a future time at which it will fire, and the clock advances to that time when the event is dequeued. This also has the side benefit of artificially “speeding up time”, which is useful when many actions happen based on long timeouts.
Re: Testing Distributed Systems with Deterministic Simulation (2014) [video]
#8My experience is that this is difficult without the system under test being designed to operate deterministically. So for example: the system clock needs to be replaceable with a fake, or the current time needs to be injected, or perhaps both. Another example: Go channels. These are a real PITA to surface in a way that allows a test harness to drive them deterministically. A while ago I built a simulator testing harn…
Re: Testing Distributed Systems with Deterministic Simulation (2014) [video]
#9My experience is that this is difficult without the system under test being designed to operate deterministically. So for example: the system clock needs to be replaceable with a fake, or the current time needs to be injected, or perhaps both. Another example: Go channels. These are a real PITA to surface in a way that allows a test harness to drive them deterministically. A while ago I built a simulator testing harn…
Disclaimer: I'm never a Rust zealot, I do understand Rust has its tradeoffs, and it's not the panacea for every problem. In fact I do have side projects which are perfectly suited and written in Go. I'm just saying Rust's design turns out to be suitable for such a deterministic testing structure, and Rust's target for system programming, can also benefit A LOT from this style of testing.
And also a shameless plug: I do have some initial work exploring this area: https://github.com/xxuejie/diviner. It's still quite rough and a lot of work is needed but I do believe this is something that is worth exploring.