Open teymour-aldridge opened 2 years ago
I'm currently experimenting with this.
I have been looking into this since I started working on distributed lunatic. My conclusion is that this would only be feasible if we shipped our own wasm execution engine (currently we use Wasmtime). We lose a lot of information when Wasmtime jit compiles the wasm code to machine code. I believe that we require a bit more granularity and control around the suspension points to make a truly deterministic test environment. Especially around sensitive edge cases, like what happens if a process links to another, but the other one doesn't get scheduled until the first one has already trapped and didn't finish establishing the link. This are some scenarios were we could tremendously benefit from a discrete event simulator.
Replacing Wasmtime with our own engine would have other benefits too and allow us to build something tailored around lunatic's use cases. It's also something I would be really excited to work on. The only downside is that it would be a huge undertaking and take us months/years to get to a usable state :).
As described in https://sled.rs/simulation.html.