Concurrency in Collaborative Editing
Let’s explore different methods of conflict resolution in concurrent collaboration on a document.
Introduction
We’ve discussed the design for a collaborative document editing service, but we haven’t addressed how we’ll deal with concurrent changes in the document by different users. However, before discussing concurrency issues, we need to understand the collaborative text editor.
What is a document editor?
A document is a composition of characters in a specific order. Each character has a value and a positional index. The character can be a letter, a number, an enter (↵), or a space. An index represents the character’s position within the ordered list of characters.
The job of the text or document editor is to perform operations like insert()
, delete()
, edit()
, and more on the characters within the document. A depiction of a document and how the editor will perform these operations is below.