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 Tree.move #634

Open
JOOHOJANG opened this issue Sep 1, 2023 · 0 comments
Open

Add Tree.move #634

JOOHOJANG opened this issue Sep 1, 2023 · 0 comments
Labels
enhancement 🌟 New feature or request hard 🧑‍🔬 Difficult to deal with or require research sdk ⚒️

Comments

@JOOHOJANG
Copy link
Contributor

What would you like to be added:
Add Tree.move

Why is this needed:
In many WYSIWYG editor, move subtree to another parent node’s child (move) is supported, so Yorkie.Tree also need it.

By using the idea of Martin Kleppmann’s paper, I’m trying to implement move operation in replicated tree.
To sum up briefly, by doing undo-do-redo, we can resolve conflict and prevent cycle of move operation.
I’ll leave detail and implementation method in the link, because it’s too much to write here.

Since we can guarantee commutativity in edit operations, now we can handle concurrent editing cases of tree edit operation.

However, we can’t guarantee commutativity between edit operation and move operation, which I’m gonna implement.
I researched few papers and the conclusion that I made is using operation log(opSet) is the most feasible way to remain current tree and implement move operation.

Using operation log to preserve every operation and if remote operation is given,

  • undo the operations which are later than given remote operation
  • do given remote operation
  • redo operations which are later than given remote operation

By doing these steps, every replica is executing operations in same order and remain consistency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request hard 🧑‍🔬 Difficult to deal with or require research sdk ⚒️
Projects
Status: Backlog
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants