-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
onChange should update instead of sync #682
base: main
Are you sure you want to change the base?
Conversation
I don't think redis guarantees message delivery which makes me worry about this change. |
If we want to change the system to only emit single change events, then we probably need to re-architect to use something like redis-streams, where we can more reliably confirm that a client receives emitted messages |
Good point, did not think about that. It seems that doing a full sync only partially helps, though. If there is a problem with receiving messages, it can affect a full sync, too, right? Definitely okay with closing this PR if y'all think it's worth the tradeoff, but it just seems counter to the idea of YJS efficiency. |
I think @janthurau could speak more to why this implementation was chosen |
Thanks for your PR @EugeneZ! Will check this out next week. In general it seems better to send the update messages, I'm just not sure what happens on newly connected redis clients, or if that still works if an update message gets lost (as raised by the @ralphiee22). An option could be to implement a simple counter field. If the counter-1 doesn't match previously received update event, the server could request a full sync again. |
Hi, thank you so much for the excellent tool! I wanted to check if there have been any updates regarding this PR? The reason I ask is that we have encountered significant freezes when working with large documents (over 2MB), and this PR seems like a potential solution to the issue. @janthurau I agree with your concerns and would like to understand how you envision the solution with the counter. Could you share how you would suggest implementing it? I’d appreciate any feedback you may have. Thanks again! ;] |
When a document changes, the Redis extension performs a full re-sync exchange with every single other server in the cluster. This is way more expensive than just sending an update.