An open API service indexing awesome lists of open source software.

https://github.com/quansight/jupyter-datastore

tmp repo to coordinate plan around jupyter datastore
https://github.com/quansight/jupyter-datastore

Last synced: 3 months ago
JSON representation

tmp repo to coordinate plan around jupyter datastore

Awesome Lists containing this project

README

          

# 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.

![](./diagram.png)

- [ ] `jupyterlab/jupyter-datastore` API spec
- [x] kernelspecs
- [x] status
- [x] terminals
- [x] kernels
- [x] sessions
- [x] 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
- [ ] https://resgate.io/
- [ ] https://www.cncf.io/blog/2018/10/24/grpc-web-is-going-ga/
- [ ] https://wamp-proto.org/
- [ ] `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`](./spec.ts)

## API spec in [`main.py`](./main.py), translated to OpenAPI spec in [`spec.json`](./spec.json) which will be implemented in Node.

https://jupyter-client.readthedocs.io/en/stable/messaging.html

http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/notebook/master/notebook/services/api/api.yaml#/contents/post_api_contents__path_

https://github.com/jupyter/jupyter/wiki/Jupyter-Notebook-Server-API

Generating spec:

```bash
python main.py > spec.json
```