yorkie-team / yorkie-js-sdk

Yorkie JavaScript SDK
https://yorkie.dev/docs/js-sdk
Apache License 2.0
142 stars 93 forks source link

Support throttle option in ClientOptions #377

Open krapie opened 2 years ago

krapie commented 2 years ago

What would you like to be added: Support throttle option in ClientOptions when defining clients.

Why is this needed: Throttling update rate on client/doc will prevent both client and server to be overloaded. For example, animating multiplayer cursors may invoke client/doc updates for every 1ms, which will overload both client and server. For more information about animating multiplayer cursors, check this article: How to animate multiplayer cursors

To avoid this, throttling update rate is necessary for both client and server.

Currently liveblocks support this option on client definition. Here's liveblocks API reference:

import { createClient } from "@liveblocks/client";

const client = createClient({
  /* ... other options ... */
  throttle: 80,
});
blurfx commented 2 years ago

it may be related to yorkie-team/yorkie#288