y-crdt / ypy-websocket

WebSocket Connector for Ypy
https://davidbrochart.github.io/ypy-websocket
MIT License
44 stars 22 forks source link

Update state and YStore, and broadcast to clients concurrently #38

Closed davidbrochart closed 1 year ago

davidbrochart commented 1 year ago

@ellisonbg It would be interesting to test this change and see if it solves the issue you mentioned about performances on NFS. The problem I see with that, and I think you also talked about it, is that if we let the Y store be out-of-sync, then that will likely cause other issues, for instance if a user connects in the middle of a session - they will probably be out of sync too, and I don't know how it will behave.

davidbrochart commented 1 year ago

Also, this is probably fine with an SQLite backend, but for a file backend it would likely require some locking mechanism to prevent accessing the file concurrently.

ellisonbg commented 1 year ago

Can the lower level APIs have a method/function to pass in a logger?

davidbrochart commented 1 year ago

Can the lower level APIs have a method/function to pass in a logger?

You mean that we would adhere to the Jupyter logger API? With logger.info(), logger.debug(), etc.

davidbrochart commented 1 year ago

OK let's use the standard Python logging system API, which I think the Jupyter logging system uses.

fcollonval commented 1 year ago

OK let's use the standard Python logging system API, which I think the Jupyter logging system uses.

Yes this is what is used by Jupyter.

davidbrochart commented 1 year ago

Thanks for the review @fcollonval.