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

Syncing trees #34

Open
marcelklehr opened this issue May 29, 2014 · 1 comment
Open

Syncing trees #34

marcelklehr opened this issue May 29, 2014 · 1 comment

Comments

@marcelklehr
Copy link

Hello there,

are there any efforts to build a tree-like commutatively replicated data type?
Do you think this is feasible?

@dominictarr
Copy link
Owner

yes - but it depends on what operations you want to have?
adding and updating branches would be easy - if you want to be able to move a subbranch to another place, a little more tricky, but still possible.

Basically, you'd need to flatten it down so it's something like a key/value store, and implement branches as a pointer to the subtree. then you move a branch just by saying that branches[x_id].children[y_id] = true something like that, when someone updates a property on y they would just set branches[y_id][key] = value.

https://github.com/dominictarr/crdt is a little like this, but only goes one layer deep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants