JupyterLab Real Time Collaboration Plan!
Comparison
Our current approach is to handle all communication on the clients. Alternatively, here we propse having a server side datastore peer that handles keeping the models up to date from the Jupyter server. It expose REST API endpoints to trigger actions on the server, that are similar to the existing kernel endpoints, except instead of returning the state they update the RTC models. They also expose many of the kernel websocket methods as REST calls.
Why?
- Keep models updated when clients are closed.
- Reduce complexity on the clients.
- Works with existing infrastructure, i.e. Jupyter Server; doesn't disrupt old way to interact with server (can be run side-by-side).
- Single source of truth datastore on the server.
- Similar REST API to existing Jupyter Server REST API โ less work for clients to switch to RTC.
-
jupyterlab/jupyter-datastore
API spec- kernelspecs
- status
- terminals
- kernels
- sessions
- contents
- config (Maybe we dont need this?)
- Rewrite to clone existing API more closely
- Add REST endpoints for execution with cell ID
- Add a table for kernel executions (for consoles)
- Deal with
request_input
, either in websockets or CRDT. - Spec out websockets for comms
- Add config for refresh
- Research alternative communication layers
-
jupyterlab/lumino-datastore
API spec- Create API spec based on Vidar's work
- Look into ORM on top of tables, using Ian's work
- Think about undo/redo behavior!
- Think about users and permissioning!
jupyterlab/lumino-datastore
Includes client and server side components for synchronized CRDTs in the browser.
jupyterlab/jupyter-datastore
The Jupyter Datastore package gives you an up to date data model of the Jupyter Server data structures in your browser. It also provides an interface to take actions on the Jupyter Server.
It is meant to be a building block for any Jupyter web UIs.
Goals:
- Save notebook outputs even when client is closed
- Add undo/redo
- Sync models between browser windows
RTC models in ./spec.ts
main.py
, translated to OpenAPI spec in spec.json
which will be implemented in Node.
API spec in https://jupyter-client.readthedocs.io/en/stable/messaging.html
https://github.com/jupyter/jupyter/wiki/Jupyter-Notebook-Server-API
Generating spec:
python main.py > spec.json