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

concurrent editing and conflicts #130

Open
tgirod opened this issue Jul 10, 2016 · 1 comment
Open

concurrent editing and conflicts #130

tgirod opened this issue Jul 10, 2016 · 1 comment

Comments

@tgirod
Copy link

tgirod commented Jul 10, 2016

Hi there. I really like your offline first approarch, with syncing happening behind the curtain, when a connection is available. But I wonder how hoodie handles edition conflicts.

For example, let's say I have two devices A and B using the same service, but A has a sparse connection while B is always online. Now, I use A and modify an object locally (no connection). But before this device can sync with the backend, I edit the same object from B, and the modification gets pushed to the backend right now.

What happens when A connects to the internet and tries to sync ? Do I lose the edit made from A ? or from B ? Do I get a warning and have a chance to resolve the conflict manually ?

@gr2m
Copy link
Member

gr2m commented Jul 10, 2016

We use CouchDB under the hood, so we have the same conflict handling. No changes ever get lost, but you have to handle conflicts as they occur, either automatically or prompt the user. If you expect lots of edits, avoid conflicts by splitting up big documents into smaller bits. When you google CouchDB conflict managements you fill find a lot of thoughts on strategies for that.

We also discussed an API for conflict management in Hoodie which might be helpful to review? hoodiehq/discussion#87

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