deathbeds / jupyterlab-dat

dat services for jupyterl(lab)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jupyterlab-dat

Try Demo on Binder

An experimental approach for publishing/subscribing to streams of notebook contents in JupyterLab over the dat peer-to-peer network This is not real-time collaboration.

Usage

In a binder or locally

Publish

  • Open a notebook
  • Click the icon in the notebook toolbar
  • Click PUBLISH
  • Copy the dat:// url, send it to someone else with jupyterlab-dat installed
  • Change the notebook

Subscribe

  • Open a new Untitled notebook
  • Click the icon in the notebook toolbar
  • Paste a dat:// url into the text box above SUBSCRIBE
  • Click SUBSCRIBE
  • Watch the notebook change

Chat

  • Click the icon in the Lab sidebar
  • Click my dat
  • Enter a name for yourself
    • Optionally, click publish
  • Open dat chat
  • If you've published or subscribed a dat, you can chat to other publishers/subscribers
    • Or paste a dat:// url into the text box
  • Click CHAT

Features

  • two-or-three click publish/subscribe
  • optional metadata sharing
  • live view of peer count and version
  • active cell following (enabled by default)
  • markdown rendering (enabled by default)
  • trust cells (enabled by default)
  • single-link sharing, e.g.
    https://mybinder.org/v2/gh/{:repo}/{:branch}?urlpath=lab/tree/dat/notebook/{:dat-hash}
    
    • opens an Untitled notebook
    • starts subscribing
    • closes sidebars
    • activates single-document and presentation mode

How it works

  • a publisher
    • joins a swarm
    • creates a archive
    • stores changes to a notebook as a stream of small files a la nbexplode in a dat
    • send subscribers a 64-character key to subscribers over an out-of-band channel e.g. chat
  • a subscriber
    • joins a swarm
    • opens a notebook, and subscribes with the provided key
    • replicates the archive
    • pushes the small files as received to their notebook
  • publishers and subscribers run a discovery-swarm-web process to help find peers in the swarm

Limitations

  • archives are created in-memory, with no persistence, and reference transient JupyterLab cell ids
    • if a publisher closes their page, that's it (though existing subscribers will keep their notebooks)
  • widgets, bokeh, or anything else comm-based, don't work at all

Try locally

Needs a conda installation, e.g. Miniconda or Anaconda

(base) conda env update
(base) source activate jupyterlab-dat
(jupyterlab-dat) bash postBuild
(jupyterlab-dat) jupyterlab

About

dat services for jupyterl(lab)


Languages

Language:Jupyter Notebook 96.8%Language:TypeScript 2.8%Language:CSS 0.2%Language:Python 0.1%Language:Shell 0.0%