Design Patterns · Senior · Question 44 of 75

How do you implement reliable undo in a collaborative editor with several users editing?

Explanation

A global rollback to a snapshot would destroy other people's changes. In collaborative systems, undo is a new inverse operation on the current state that accounts for concurrent edits. Command and Memento work locally, but collaboration needs OT or CRDT models.

Further reading

Problem with a question

Design Patterns · Senior · question 44

Test yourself

Take the Design Patterns · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz