You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, users may prefer to store the original document content in a service DB rather than in Yorkie. This results in the document not adhering to the Single Source of Truth (SSOT) principle and causes duplication of the document between Yorkie and the service DB. Therefore, a separate policy is necessary to maintain consistency.
To address this scenario, it is proposed to add options to Client.Attach and Client.Detach and provide the following guideline:
The main idea is to consider Yorkie Document as the primary source of truth during editing and switch to the service DB as the primary source after editing is completed.
A. Start Document Editing:
When editing begins, first fetch the key and content of the document stored in the service DB.
Attach Yorkie Document using this key, with the createIfNotExists: true option, along with the content stored in the service DB.
If the document has already been created in Yorkie by another client, receive the content being edited, and if not created, create the Yorkie document using the content stored in the DB.
What would you like to be added:
In some cases, users may prefer to store the original document content in a service DB rather than in Yorkie. This results in the document not adhering to the Single Source of Truth (SSOT) principle and causes duplication of the document between Yorkie and the service DB. Therefore, a separate policy is necessary to maintain consistency.
To address this scenario, it is proposed to add options to Client.Attach and Client.Detach and provide the following guideline:
The main idea is to consider Yorkie Document as the primary source of truth during editing and switch to the service DB as the primary source after editing is completed.
A. Start Document Editing:
createIfNotExists: true
option, along with the content stored in the service DB.B. Finish Document Editing:
Why is this needed:
The text was updated successfully, but these errors were encountered: