-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Collaborative architecture documentation #94
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
You're right, cell execution goes through the kernel protocol over WebSocket. There is not much documentation about it, but maybe this PR can help understand. This is a different WebSocket than the WebSocket used for the Y-document synchronization. Let's take a look at what happens. |
Thanks for the explanation, David, and also the links and pointers. That gives me some more reading material. I assume the Is that still the case in the new world of POST-execution-order? Or do you have to make sure here that all the Y-Doc changes the user created in the cell they pressed Ctrl+Return on have successfully propagated to the server before actually running execution? I guess sending a snapshot of the document (or cell rather) that the user pressed Ctrl+Return on along with execution request, is most aligned with user expectations. |
Yes.
No, and in this case I agree that there could be a race condition indeed, that's a good point. I'm not sure we want to send the code along with the execution request though, since it would compete with the shared cell content and potentially create other issues. Maybe a solution would be to make the document execution state a shared property of the document, so that the execution request also goes through the Y-WebSocket instead of a parallel REST API? |
I am trying to understand how the y-py integration works in Jupyter as I am generally interested in collaborative software and after some research, y.js seems like one of the best approaches I could find. Thanks for that btw!!
I read ypy_websocket, jupyterlab_collaboration and jupyter_ydoc and have a fair understanding now of how the document sync between clients and backend works.
One thing I was wondering: I got the impression that cell execution actions are communicated outside of the ypy based collaborative document sync. If those are two separate communication channels how are race conditions avoided? E.g. if I modify a cell and immediately execute, how is it made sure that my execution action is processed after the document has been synced on the server to my local state?
The text was updated successfully, but these errors were encountered: