Closed
Description
I also opened this issue in JupyterLab.
Problem
I think that the YDocWebSocketHandler is not specific to JupyterLab and deserves to live in jupyter-server core.
It is a generic websocket server that can talk to any websocket provider for the supported Y documents. JupyterLab is just one of them, but I can imagine e.g. a Python web client that would also have a websocket provider, such as ypy-websocket, to implement a Jupyter client in the terminal. In that case we wouldn't need to run JupyterLab in the back-end but only Jupyter Server.
Proposed Solution
Move ydoc_handler.py to jupyter-server.
Additional context
This is also needed if we want to implement a new kernels REST API in jupyter-server.