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

Websockets Drawing Example #76

Merged
merged 6 commits into from
Sep 13, 2022
Merged

Websockets Drawing Example #76

merged 6 commits into from
Sep 13, 2022

Conversation

Waidhoferj
Copy link
Collaborator

Added simple collaborative drawing example to a new examples folder.

@Waidhoferj Waidhoferj added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 6, 2022
@Waidhoferj Waidhoferj self-assigned this Sep 6, 2022
@davidbrochart
Copy link
Collaborator

Don't you want to use https://github.com/y-crdt/ypy-websocket for that?

@Waidhoferj
Copy link
Collaborator Author

@davidbrochart that was my original idea, but I ran into an error that I couldn't debug. We could figure out the issue and replace the websocket logic.

The error involved a buffer read that expected 2 bytes and received 0.

@davidbrochart
Copy link
Collaborator

The error involved a buffer read that expected 2 bytes and received 0.

Difficult to see where it could come from, but if you still have the code it would be interesting to open an issue with it.

@Waidhoferj
Copy link
Collaborator Author

Sounds good, I'll create a minimal example and post an issue to the ypy-websocket repository.

Comment on lines 31 to 32
if update != b'\x00\x00':
self.send_q.put_nowait(update)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Horusiath I noticed that the observe_after_transaction is running in a tight loop with an empty update message when nothing has changed. Is this happening due read-only transaction operations in the draw() loop that don't change the state?

Waidhoferj and others added 2 commits September 12, 2022 20:33
Co-authored-by:  Kevin Jahns <kevin.jahns@protonmail.com>
@Waidhoferj Waidhoferj merged commit d3387a5 into main Sep 13, 2022
@Waidhoferj Waidhoferj deleted the websocket-example branch September 13, 2022 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants