Skip to content

Editing conflicts #35

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
tgirod opened this issue May 22, 2017 · 5 comments
Open

Editing conflicts #35

tgirod opened this issue May 22, 2017 · 5 comments

Comments

@tgirod
Copy link

tgirod commented May 22, 2017

First: I've been dreaming of something like this for several years now.

Now, to my question: how does NS manage editing conflicts when synchronizing several devices ? If done well, this would open the door to do collaborative editing of tiddlywiki, something I desperately long for.

@danielo515
Copy link
Contributor

Hello @tgirod
Thank you for your interest on NoteSelf.

Regarding editing conflicts, we use pouchdb under the hood. This means that, by default, we use the same conflict resolve mechanism that pouchdb does. Each time a tiddler is edited, an unique revision ID is created, and the tiddler is saved as a new revision of the previous tiddler. If another person edits the same tiddler at the same time, an unique ID will be generated for that particular edition. Then when tiddlers are synchronized the tiddler with the highest edition ID (or more recent) is picked. This happens silently, but you can navigate through edition history using the UI. We don't have however a mechanism to pick one particular edition, neither for side-by side comparison. Pull requests on that regard are welcome.

Regards

@johnd0e
Copy link

johnd0e commented Oct 2, 2018

This happens silently

Than it's just impossible to resolve such conflicts: the system never let us even know that there were any edit conflict.

Remember that pouchdb is good in offline, and imagine that 2 persons during same time make several edition offline.
What should happen when they go online, and their db try to synchronize with online couchdb?
The 1st person should succeed, but the 2nd person have to get warning about conflict, with the possibility to resolve it.
And it does not matter which edition was later, as long as both were independent and offline.

Actually I know nothing about pouchdb internals, so I am not sure if it ever possible to reliably resolve such conflicts.

I hope it's possible, as long as we have current and previous rev hashes to find if one is parent of another or not.

We don't have however a mechanism to pick one particular edition, neither for side-by side comparison.

Well, it's least important part after all. More important is to inform user about conflict, and save conflicting revisions in any form (may be as renamed tiddler).

@danielo515
Copy link
Contributor

More important is to inform user about conflict, and save conflicting revisions in any form (may be as renamed tiddler)

Maybe it could be enough to just inform and save the tiddler as you said until we find a better way of resolving conflicts

@danielo515
Copy link
Contributor

We added revision traveling not very long ago. Maybe it is solved by now?

@johnd0e
Copy link

johnd0e commented Apr 20, 2020

Need to check this

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

No branches or pull requests

3 participants