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

Add interface to stop synchronization while maintaining realtime sync #820

Open
hackerwins opened this issue Mar 12, 2024 · 1 comment
Open
Labels
enhancement 🌟 New feature or request sdk ⚒️

Comments

@hackerwins
Copy link
Member

hackerwins commented Mar 12, 2024

What would you like to be added:

Currently, Yorkie has the following synchronization modes:

A. Manual Sync

  • Manually handle Document synchronization
  • Do not connect to a stream to receive Document events
  • Do not add Presence of the Client
await client.attach(doc, { isRealtimeSync: false });

B. Realtime Sync

  • Automatically handle Document synchronization
    • PushPull Mode: Send local changes to other clients and reflect changes from other clients in the local document
    • PushOnly Mode: Send local changes to other clients but do not receive changes from other clients, preventing undoing due to remote changes in IME mode
  • Connect to a stream to receive Document events
  • Add Client Presence to notify other Clients
await client.attach(doc, {
  initialPresence: { color: 'blue', cursor: { x: 0, y: 0 } },
  isRealtimeSync: true,
});

Refer to

Additionally, there is a need for a mode where the user can maintain Realtime Sync(register Presence) but neither send nor receive local changes from other clients.

@hackerwins hackerwins added the enhancement 🌟 New feature or request label Mar 12, 2024
@hackerwins hackerwins changed the title Add interface to stop synchronization while maintaining real-time mode Add interface to stop synchronization while maintaining realtime sync Mar 12, 2024
@hackerwins
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request sdk ⚒️
Projects
Status: Todo
Development

No branches or pull requests

1 participant