4 ms·
If I understand this correctly, it's basically transmitting database changes over a websocket? If so, how does that work re: performance when it comes to someth
by kbyatnal 5y ago
If I understand this correctly, it's basically transmitting database changes over a websocket? If so, how does that work re: performance when it comes to something like live cursor positions?
Writing to the DB every 50ms for each cursor on the screen doesn't seem great for performance...or am I missing something?
- kiwicopple 5y agoThis example is built with our refactored Realtime server which solves that issue. (We had a lot of developers trying exactly that, and it ended poorly for their database) The new version adds "Channels", which are used for sending ephemeral/high-frequency events to other connected users.
- wenbo 5y agoIt depends on the task at hand. If you wish to share cursor positions then you'll be using the new Broadcast feature where data is not written to the DB but forwarded to other clients. That's how we've implemented the multiplayer cursor positions in this demo.