Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify Y-WebSocket endpoint path #215

Open
davidbrochart opened this issue Nov 15, 2023 · 0 comments
Open

Specify Y-WebSocket endpoint path #215

davidbrochart opened this issue Nov 15, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@davidbrochart
Copy link
Collaborator

Problem

We already have some kind of ad-hoc schema for the WebSocket endpoint path, e.g.:

  • /api/collaboration/room/json:notebook:{document_id}: for connecting to a notebook.
  • /api/collaboration/room/text:file:{document_id}: for connecting to a text file.
  • /api/collaboration/room/JupyterLab:globalAwareness: for connecting to the "awareness".

If we wanted to have collaborative widgets, or directory content, we could have:

  • /api/collaboration/room/ywidget:{widget_id}: for connecting to a collaborative widget.
  • /api/collaboration/room/drive:{drive_id}: for connecting to a drive.

We currently assume that if an endpoint path has two colons (like json:notebook:{document_id} or text:file:{document_id}), then the corresponding shared document is file-backed (that's how we dump files to disk). And we assume that if an endpoint path has only one colon (like /api/collaboration/room/JupyterLab:globalAwareness), then it is a "transient" document that is not file-backed. Widgets would not be file-backed, but drives would be, although maybe not in the sense of a regular file that needs to talk to the file ID service.

Proposed Solution

We should normalize the structure of the Y-WebSocket endpoint paths. The number of colons doesn't seem to be a solid solution, and we should probably have a field saying if the document is file-backed.

cc @ellisonbg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant