Table of Contents
Fetching ...

Undo and Redo Support for Replicated Registers

Leo Stewen, Martin Kleppmann

TL;DR

This work surveys the undo and redo semantics of current mainstream collaboration software and derives principles for undo and redo behavior in a collaborative setting, and applies these principles to a simple CRDT, the Multi-Valued Replicated Register, and presents a novel undo and redo algorithm.

Abstract

Undo and redo functionality is ubiquitous in collaboration software. In single user settings, undo and redo are well understood. However, when multiple users edit a document, concurrency may arise, leading to a non-linear operation history. This renders undo and redo more complex both in terms of their semantics and implementation. We survey the undo and redo semantics of current mainstream collaboration software and derive principles for undo and redo behavior in a collaborative setting. We then apply these principles to a simple CRDT, the Multi-Valued Replicated Register, and present a novel undo and redo algorithm that implements the undo and redo semantics that we believe are most consistent with users' expectations.

Undo and Redo Support for Replicated Registers

TL;DR

This work surveys the undo and redo semantics of current mainstream collaboration software and derives principles for undo and redo behavior in a collaborative setting, and applies these principles to a simple CRDT, the Multi-Valued Replicated Register, and presents a novel undo and redo algorithm.

Abstract

Undo and redo functionality is ubiquitous in collaboration software. In single user settings, undo and redo are well understood. However, when multiple users edit a document, concurrency may arise, leading to a non-linear operation history. This renders undo and redo more complex both in terms of their semantics and implementation. We survey the undo and redo semantics of current mainstream collaboration software and derive principles for undo and redo behavior in a collaborative setting. We then apply these principles to a simple CRDT, the Multi-Valued Replicated Register, and present a novel undo and redo algorithm that implements the undo and redo semantics that we believe are most consistent with users' expectations.
Paper Structure (10 sections, 4 figures, 1 table, 3 algorithms)

This paper contains 10 sections, 4 figures, 1 table, 3 algorithms.

Figures (4)

  • Figure 1: Different semantics of undo and redo with two users $A$ and $B$ collaboratively editing one (two) register(s).
  • Figure 2: An operation history which is replicated between two replicas $A$ and $B$ with undo and redo operations. For clarity, undo and redo operations are not labeled as RestoreOps. Their respective anchor operations are indicated by the dashed blue arrows and denoted in parentheses. The dotted lines indicate time steps during which we show the nodes' states in \ref{['tab:node-states']}.
  • Figure 3: A difficult scenario for counter-based approaches.
  • Figure 4: Runtime of the last undo/redo operation in a sequence of alternating undo-redo operations of length $n$ (counting one undo-redo-pair as one).