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

Message batching #1

Open
rsimon opened this issue Oct 1, 2023 · 0 comments
Open

Message batching #1

rsimon opened this issue Oct 1, 2023 · 0 comments

Comments

@rsimon
Copy link
Member

rsimon commented Oct 1, 2023

Right now, the Supabase plugin pretty much fires out a realtime message for every store update. For image annotations, this can lead to a high number of updates (when dragging a shape). By design, the Supabase SDK discards messages after a given threshold. This typically leads to the following situation:

  • User drags a shape
  • Drag gets synchronized to other users until message rate threshold is reached
  • Synchronization stops for other users
  • Once the user deselects the shape and thus commits the change to the DB, other users will see a small jump as the final state is re-established

This is a cosmetic issue more than anything else. But ideally, we'd want a message batching mechanism, which debounces thje store updates and only sends a controlled number of broadcast messages. This would avoid the final jump, as the DB change data capture message re-establishes "true" sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant