0

I built a component to make high frequency updates work on Convex (kinda)

https://stack.convex.dev/batched-replay-component(stack.convex.dev)
A component called "batched replay" was created for the Convex platform to handle high-frequency updates like multiplayer cursors without overwhelming the database. The technique involves collecting user inputs, such as mouse movements, into a batch on the client side before sending them to the server. Other clients then receive this batch and replay the actions with the original timing, creating a smooth animation with only a few database writes per second. While this method introduces a slight delay, it enables real-time features like collaborative drawing and game ghosts. The trade-offs include this latency and the potential cost, as the number of function calls scales with the number of connected users.
0 points•by ogg•2 hours ago

Comments (0)

No comments yet. Be the first to comment!

Have an account? Log in to join the discussion.