GithubHelp home page GithubHelp logo

jupyter-server / pycrdt-websocket Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 7.0 796 KB

WebSocket Connector for pycrdt

Home Page: https://jupyter-server.github.io/pycrdt-websocket

License: MIT License

Python 97.73% JavaScript 2.27%

pycrdt-websocket's People

Contributors

3coins avatar bnavigator avatar bollwyvl avatar davidbrochart avatar dlqqq avatar hbcarlos avatar jtpio avatar pre-commit-ci[bot] avatar zsailer avatar zswaff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pycrdt-websocket's Issues

Extract out ystores to a new repository

Problem

Currently, ystores are part of pycrdt-websocket, but they are transport-agnostic and should be used for other transports than WebSockets.

Proposed Solution

Move the ystores to a new repository, pycrdt-store.

Optionally handle exceptions in YStore

Adding an issue to track some follow-up work mentioned here: #33 (comment)

The intent here is to handle exception where they happen, rather than outer layers. In this case, the exception could handle in a Ystore, but it wouldn't be handled until the YRoom catches the exception. We should follow the exception_handler pattern introduced in #31 to handle exceptions in the YRoom.

[New Issue] When using pycrdt-websocket 0.13.1, file access in jupyterlab can hang

When using pycrdt-websocket 0.13.1, file access in jupyterlab can hang.

small.file.hangs.mp4

Error logs shows that when ystore.read() method is called before ystore db initialization finishes, it is waiting on an old Event created in __init__ method and ystore.start() method has assigned a new Event. And the old Event() is never set hence file access is blocked.

Error Logs:

[I 2024-05-02 11:10:30.558 ServerApp] Creating new notebook in /TestRTC2
[I 2024-05-02 11:10:30.988 ServerApp] Request for Y document 'TestRTC2/Untitled62.ipynb' with room ID: e6db9699-d261-481e-a188-d76652c290b8
[I 2024-05-02 11:10:31.329 YDocExtension] Creating FileLoader for: TestRTC2/Untitled62.ipynb
initialize ystore, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a83355a0>
[I 2024-05-02 11:10:31.332 YDocExtension] Watching file: TestRTC2/Untitled62.ipynb
[I 2024-05-02 11:10:31.337 ServerApp] Initializing room json:notebook:e6db9699-d261-481e-a188-d76652c290b8
read data, self.db_initializer=<anyio._backends._asyncio.Event object at 0x7ff5a83355a0>
starting initialize db, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a8335a80>
ended initialize db, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a8335a80>

We can see that read data, self.db_initializer=<anyio._backends._asyncio.Event object at 0x7ff5a83355a0> is waiting on an old Event which is never set. Since after start method is called, self.db_initialized is replaced with a new Event.

starting initialize db, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a8335a80>
ended initialize db, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a8335a80>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.