yorkie-team / codepair

Build your own AI-powered collaborative markdown editor in just 5 minutes
https://codepair.yorkie.dev
Apache License 2.0
46 stars 19 forks source link

Resolve the issue of `ensure activated client` displaying to handle reconnection by subscribing to `document.subscribe('status')` #286

Open devleejb opened 1 month ago

devleejb commented 1 month ago

Description: When a user opens their laptop after a long period of time, the client may be inactive. To address this, the service developer needs to subscribe to document.subscribe('status') and handle reconnection by creating a new client and document.

Situation Explanation: The root cause of this issue lies in the limitations of CRDT Tombstone & GC structure and the uncertainty of browser termination timing. Therefore, the service developer needs to be aware of the ClientDeactivateThreshold situation. Depending on the application's characteristics, the developer needs to adjust when to deactivate the client.

Additional Information: In scenarios where unsynchronized content remains locally on the server at this time, there is a risk of content loss if not synced.

devleejb commented 1 month ago

Related to https://github.com/yorkie-team/yorkie/issues/928

devleejb commented 3 weeks ago

Related to https://github.com/yorkie-team/yorkie-js-sdk/issues/881