jupyterlab / jupyter-collaboration

A Jupyter Server Extension Providing Support for Y Documents
https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/
Other
140 stars 29 forks source link

Start Y Websocket Server earlier and make it resilient to crashes #294

Closed Zsailer closed 2 months ago

Zsailer commented 2 months ago

This prevents the server locking we see in #290

This PR makes two critical changes:

  1. Instead of starting the y-websocket server when the first YWebsocketHandler request is made, this PR starts the server in the startup sequence of the ExtensionApp.
  2. Handle exceptions in the ywebsocket server using the exception logging offered in https://github.com/jupyter-server/pycrdt-websocket/pull/31

This depends on this PR in Jupyter Server: https://github.com/jupyter-server/jupyter_server/pull/1417

github-actions[bot] commented 2 months ago

Binder :point_left: Launch a Binder on branch Zsailer/jupyter-collaboration/resilient-y-server

Zsailer commented 2 months ago

I think that it would be better to have an auto_restart parameter passed to pycrdt-websocket's WebsocketServer

Sure! That sounds great. I'm happy to make the PR over there as well. Just let me know.

davidbrochart commented 2 months ago

I opened https://github.com/jupyter-server/pycrdt-websocket/pull/31.

Zsailer commented 2 months ago

This depends on a release of pycrdt-websocket (hence why the tests are failing).

Zsailer commented 2 months ago

Closing in favor of #295