results are now saved to yDoc.getMap("rootMap").get("resultMap"), so that they sync with peers and are persisted
runtime status is now saved to yDoc.getMap("rootMap").get("runtimeMap"), so that peers share the exact runtime and share real-time status.
the connection to the runtime kernel is moved behind Yjs.
Detail: the frontend no longer directly connects to the runtime websocket. Instead, the Yjs server connects to runtime WS, receives and sets results in "resultMap", and sets runtime status in "runtimeMap".
Effect: if you have some long-running code, you can now safely close the page. The runtime will continue to run, and results will continue to be populated (with a TODO caveat below). When you reopen the page, you can reload the exact results and runtime status again.
[ ] Caveats (TODO): Although the runtime TTL is 12 hours, there's a 30s timeout to keep a YDoc in memory when no one is connected. These two TTLs shall be unified in the future.
Now, you can create multiple runtimes and activate either one, see below screenshot:
Changes:
.getMap("rootMap").get("resultMap")
, so that they sync with peers and are persisted.getMap("rootMap").get("runtimeMap")
, so that peers share the exact runtime and share real-time status.