Core observation:We're not far away from performing time-travel on particles. One obvious use case is debugging particles through replaying the exact session that occurred. i.e. Developer clicks around, they see something is wrong. They have a hypothesis, so they set up some breakpoints and perform a replay of the session inspect what was happening inside particles.
What we need:
Refactoring a few APIs to become oracles controlled by Particle Execution Host: XHRs, setTimeout, APIs for receiving time and a random number generator?
How do we do that:
Particles Execution Context can be re-created with exactly the same messages being replayed to it. Particles should in principle perform the same requests once booted (i.e. they should be deterministic). If they are not - we should figure out why.
Caveat:
We cannot really time travel backwards, unless PEC becomes in control of the internal state of particles (That seems to be the same as enforcing reactive programming model, which is being discussed). But we can wipe everything and reboot the PEC and replay messages, which is functionally equivalent to time travel.
Core observation: We're not far away from performing time-travel on particles. One obvious use case is debugging particles through replaying the exact session that occurred. i.e. Developer clicks around, they see something is wrong. They have a hypothesis, so they set up some breakpoints and perform a replay of the session inspect what was happening inside particles.
What we need: Refactoring a few APIs to become oracles controlled by Particle Execution Host: XHRs, setTimeout, APIs for receiving time and a random number generator?
How do we do that: Particles Execution Context can be re-created with exactly the same messages being replayed to it. Particles should in principle perform the same requests once booted (i.e. they should be deterministic). If they are not - we should figure out why.
Caveat: We cannot really time travel backwards, unless PEC becomes in control of the internal state of particles (That seems to be the same as enforcing reactive programming model, which is being discussed). But we can wipe everything and reboot the PEC and replay messages, which is functionally equivalent to time travel.