Open fengb opened 4 years ago
Potential new design:
This seems pretty complicated, but it relies on 2 simple ideas:
Separate execution instances is needed for low latency, while rewinding time should enable seamless reconciliation. And this makes frontend integration pretty easy: it's already done!
Thanks to @marijnfs for the inspiration on Youtube comments.
We need a way to drive a web interface independently from the Fundude core. Ideally this would happen transparently — e.g. only exists when requesting serial connection.
UX architecture
Possible solutions
Background
The serial port is a synchronous device that requires the remote data to exist. Based on some quick hacks, I’ve discovered that ROM programming expects data to be available immediately, possibly some wiggle room of ~10ms, but definitely not going to work across browser latency (1-2 frames ~30ms), let alone actual network latency (100+ ms).
This means getting serial link to work properly requires the Fundude instances to be synced together. This is only really feasible if both are running in the same wasm instance... which means we need to somehow drive the web interface separately from the core.