2

There are many ways of handling undo/redo and conflicts when multiple people are editing documents in realtime.

I'm thinking about every k seconds to send the document payload off with a commit message to a DVCS. For the undo/redo problem, maybe I'll use a Rope.

But I'm uncertain. what's the best way to resolve merge conflicts and per-user undo/redo?, e.g.: how does Google Docs do it?

Cœur
  • 37,241
  • 25
  • 195
  • 267
stackoverflowuser95
  • 1,992
  • 3
  • 20
  • 30
  • I don't have much experience with real time collab, but I believe Google Docs uses a system called Differential Synchronization: http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/35605.pdf – David Yue Oct 24 '15 at 04:35
  • Thanks, interesting article. Maybe add as answer? – stackoverflowuser95 Oct 24 '15 at 13:15
  • PS: Found this https://github.com/cujojs/jiff on http://www.slideshare.net/briancavalier/differential-sync-and-json-patch-s2-gx-2014 – stackoverflowuser95 Oct 24 '15 at 13:17

1 Answers1

1

Based on your tags you are using web-technologies.

Taking @DavidYue's advice and using Differential Synchronization[1], I would recommend using the diffsync developed during this thesis[2].

Under the covers it uses socket.io, see example with client, server and DataAdapter (data-source).


[1] N. Fraser, “Differential Synchronization”, in DocEng’09, Proceedings of the 2009 ACM Symposium on Document Engineering, 2 Penn Plaza, Suite 701, New York, New York 10121-0701, 2009, pp. 13–20.

[2] J. Monschke, “Building a collaborative music production environment using emerging web standards”, Masters Thesis, HTW, Berlin, Germany, 2014.

Samuel Marks
  • 1,611
  • 1
  • 20
  • 25