Concurrency in Collaborative Editing

Let us explore different methods for conflict resolution in concurrent collaboration on a document.

Introduction

We have discussed the design for a collaborative document editing service, but we have not yet addressed how we will deal with concurrent changes in the document by different users. However, before discussing concurrency issues, we will need to understand (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 an alphabet, a number, enter (↵), or space, whereas an index represents the character’s position within the ordered list of characters.

The job of the text/document editor is to perform operations like insert(), delete(), edit(), etc. on the characters within the document. A depiction of a document and how the editor will perform these operations is provided below.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy