What's the big deal about Deterministic Simulation Testing?
notes.eatonphil.com
What's the big deal about Deterministic Simulation Testing?
1–10 of 15 posts
Re: What's the big deal about Deterministic Simulation Testing?
#2Antithesis employee here. Happy to jump in and answer any burning questions people might have about Deterministic Simulation Testing (DST).
Re: What's the big deal about Deterministic Simulation Testing?
#3Re: What's the big deal about Deterministic Simulation Testing?
#4I haven't dealt with it directly on Firezone but I wrote one or two games this way for game jams years ago, and I keep wishing it would catch on. It was harder with the games because floating-point math doesn't like to be deterministic across platforms.
Re: What's the big deal about Deterministic Simulation Testing?
#5Re: What's the big deal about Deterministic Simulation Testing?
#6I believe DST to be the wrong solution to the actual problem. Its main advantage is that it doesn’t require that people used to design distributed system actually acquire a new skill set and it doesn’t challenge the status quo too much (after all it’s pretty much just fuzzing on path you have chosen to make fuzzable).
Re: What's the big deal about Deterministic Simulation Testing?
#7You can have the communication channels between components under the control of the simulation environment rather than have them happen in their 'normal' manner. This allows you to inject latency between components, 'fiddle' with the inputs/outputs as suggested as well as record messaging (assuming you're working with systems that exchange messages/events) with appropriate event times.
Another important point around clocks is that you'll want to include a scheduling API in your clock components to be able to schedule events for themselves in the future. If you start moving to event-time then being able to fast-forward in time is another advantage.
Overall it's worth considering the class of issue you're trying to detect with this approach. It's great to be able to run things in event time, debug ad-nauseam but you're not going to catch race conditions without the smarts mentioned around native scheduling.
There are some parallels as well between this style of testing and production replication, so that's good to have at the back of your mind if you're looking to collect production telemetry/ingress + egress data. If you build a good system for this type of testing producing reproduceable code will be part of your development process and you're more likely to be able to produce tooling for investigation/reproduction of production issues.
(The context in which I do work that's kind of in this area is robust backtesting of trading systems)
Re: What's the big deal about Deterministic Simulation Testing?
#8I don't think you have to have systems in the same thread/process if you have bake in an API for controlling time and ingress/egress for each component. (depending on what you're trying to test) You can have the communication channels between components under the control of the simulation environment rather than have them happen in their 'normal' manner. This allows you to inject latency between components, 'fiddle'…
Re: What's the big deal about Deterministic Simulation Testing?
#9Re: What's the big deal about Deterministic Simulation Testing?
#10I don't think you have to have systems in the same thread/process if you have bake in an API for controlling time and ingress/egress for each component. (depending on what you're trying to test) You can have the communication channels between components under the control of the simulation environment rather than have them happen in their 'normal' manner. This allows you to inject latency between components, 'fiddle'…
Edit: trading systems isn’t an area I considered for this work. A lot of parallels, though.