Let's say there's a web app where you can edit documents, similar to Google Docs but more lightweight. A document can be shared and multiple people can edit it. Every change is immediately synced to the server.

Right now, documents can only be edited online and people can't edit the same document concurrently.

Now you want to implement an offline mode so that people can work on documents while traveling or on mobile without internet.

What are some simple user experience patterns to avoid common sync issues? I can think of the following:

  • A Git-like merge process
  • If a user is offline and wants to edit a document "my-document", an offline copy is created "my-document-copy". When the user comes back online, it is merged automatically if there are no conflicts and "my-document-copy" is deleted. If there are conflicts, both "my-document" and "my-document-copy" are kept. In the end, conflict-free merges are avoided but it seems like this would also inevitably lead to a manual merge process.

Are there any other user-interaction modes to avoid complicated merges? I wonder if there are any other user-interaction modes to avoid complicated merges during offline/sync for a casual user base.

I would like to avoid the user having to think his way through a Git-like merging process. Even though this would probably be the most robust option, it does not appeal to casual users.

The copy process still requires a manual merge, but at least the user has the option to just keep a separate copy of his document without merging it into the original.

  • Just how would you determine no conflicts? Even edits to separate paragraphs could be a conflict. – paparazzo Nov 26 '14 at 16:05
  • I could save the version the edits were based off to determine if the document changed in the meantime. – Macks Nov 26 '14 at 19:27
  • All you care is if it changed? Why "merge"? Why do you use the term conflicts if it is just a version stamp? The question implies a lot more than version stamp. If it is a newer version then you just use it to replace the current. – paparazzo Nov 26 '14 at 19:33
  • "No conflicts" means the document wasn't changed by another user while the user was offline. If that is the case, the changes that were made offline can automatically be merged without conflicts. – Macks Nov 26 '14 at 23:49
  • For the third time. Why would you "merge" changes to a document not changed? Would it not be just a lot easier to replace the unchanged document with the document than had been changed? – paparazzo Nov 27 '14 at 0:02

Allowing people to edit different versions of a document, and then merging the edits in a satisfactory way, is a complex task. Any adequate interface to implement this will be fairly complicated.

Your simplified system is quite problematic:

  • A user editing a certain document expects to be editing that document, not a copy. To discover after the fact that the changes can't be applied back to the original document will be deeply unsatisfactory.
  • The behavior of the same actions by a user is different, based on unseen actions of another user. This will be very confusing.

If you want a simple system, I suggest you preserve your current limitation: people can't edit the same document concurrently.

You could implement this by requiring a user to check out a document for editing (while online) if they want to edit it in offline mode. This method has some shortcomings too, but at least the limitations occur before the user puts a lot of effort into editing the document.

  • If the user was offline, I could have the edit-button say "Create offline copy to edit" or something like that. I don't think it's viable to have the user checkout a document for offline editing because he might not know that he will want to edit a document offline beforehand. – Macks Nov 26 '14 at 19:29
  • @macks If they are offline then by definition they have a copy. Your terminology is less than clear. – paparazzo Nov 26 '14 at 19:39
  • I am not speaking in technical terms, "Create offline copy to edit" is what the user would see to make it clear to him that he is creating a copy of the document if he edits it offline. – Macks Nov 26 '14 at 23:45
  • But user already had an offline copy so I fail to see how that adds clarity. Why not speak in technically accurate terms? – paparazzo Nov 27 '14 at 0:11
  • I am speaking from the user's perspective. "Create and offline copy to edit" makes it clear to the user that changes might not automatically be synced to the document he originally was trying to edit offline. – Macks Nov 27 '14 at 8:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.