skip to main content
research-article

Real Differences between OT and CRDT in Correctness and Complexity for Consistency Maintenance in Co-Editors

Authors Info & Claims
Published:29 May 2020Publication History
Skip Abstract Section

Abstract

OT (Operational Transformation) was invented for supporting real-time co-editors in the late 1980s and has evolved to become core techniques widely used in today's working co-editors and adopted in industrial products. CRDT (Commutative Replicated Data Type) for co-editors was first proposed around 2006, under the name of WOOT (WithOut Operational Transformation). Follow-up CRDT variations are commonly labeled as "post-OT" techniques capable of making concurrent operations natively commutative in co-editors. On top of that, CRDT solutions have made broad claims of superiority over OT solutions, and often portrayed OT as an incorrect and inefficient technique. Over one decade later, however, CRDT is rarely found in working co-editors; OT remains the choice for building the vast majority of today's co-editors. Contradictions between the reality and CRDT's purported advantages have been the source of much confusion and debate in co-editing researcher and developer communities. To seek truth from facts, we set out to conduct a comprehensive and critical review on representative OT and CRDT solutions and working co-editors based on them. From this work, we have made important discoveries about OT and CRDT, and revealed facts and evidences that refute CRDT claims over OT on all accounts. These discoveries help explain the underlying reasons for the choice between OT and CRDT in the real world. We report these results in a series of three articles. In this article (the second in the series), we reveal the differences between OT and CRDT in their basic approaches to realizing the same general transformation and how such differences had resulted in different technical challenges and consequential correctness and complexity issues. Moreover, we reveal hidden complexity and algorithmic flaws with representative CRDT solutions, and discuss common myths and facts related to correctness and complexity of OT and CRDT. We hope the discoveries from this work help clear up common myths and confusions surrounding OT and CRDT, and accelerate progress in co-editing technology for real world applications.

References

  1. Agustina, Liu, F., Xia, S., Shen, H.F. and Sun. C. CoMaya: Incorporating advanced collaboration capabilities into 3D digital media design tools. ACM CSCW (2008), 5--8.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Agustina and Sun. C. Dependency-conflict detection in real-time collaborative 3D design systems. ACM CSCW (2013), 715--728.Google ScholarGoogle Scholar
  3. Agustina and Sun, C. Operational transformation for real-time synchronization of shared workspace in cloud storage. ACM GROUP (2016), 61--70.Google ScholarGoogle Scholar
  4. Ahmed-Nacer, Ignat, M. C.-L, Oster, G., Roh, H.-G. and Urso, P. Evaluating CRDTs for real-time document editing, ACM DocEng (2011), 103--112.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Andr´e, L., Martin, S., Oster, G. and Ignat, C.-L. Supporting adaptable granularity of changes for massive-scale collaborative editing. IEEE CollaborateCom (2013), 50--59.Google ScholarGoogle ScholarCross RefCross Ref
  6. Attiya, H., Burchkhardt, B., Gotsman, A., Morrison, A., Yang H., and Zawirski, M. Specification and complexity of collaborative text editing. ACM PODC (2016), 259--268.Google ScholarGoogle Scholar
  7. Begole, J., Rosson, M.B. and Shaffer, C.A. Flexible collaboration transparency: supporting worker independence in replicated application-sharing systems. ACM TOCHI 6, 2 (1999), 95 -- 132.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Boucheneb, B. and Imine. A. On model-checking optimistic replication algorithms. FORTE on Formal Techniques for Distributed Systems (2009), 73 -- 89.Google ScholarGoogle Scholar
  9. Briot, L. Urso, P. and Shapiro, M. High responsiveness for group editing CRDTs. ACM GROUP (2016), 51--60.Google ScholarGoogle Scholar
  10. Cho, B., Sun, C. and Agustina. Issues and Experiences in Building Heterogeneous Co-Editing Systems. PACMHCI, Vol. 3, GROUP, Article 245, (December 2019).Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Crowley, C. Data structures for text sequences. Computer Science Department, University of New Mexico, 1996. http://www.cs.unm.edu/~crowley/papers/sds/sds.htmlGoogle ScholarGoogle Scholar
  12. Davis, A., Sun, C. and Lu, J. Generalizing operational transformation to the standard general markup language. ACM CSCW (2002), 58--67.Google ScholarGoogle Scholar
  13. Day-Richter, J. What's different about the new Google Docs: Making collaboration fast. https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs.htmlGoogle ScholarGoogle Scholar
  14. Drucker, Peter F. A brief glance at how various text editors manage their textual fata. https://ecc-comp.blogspot.com/2015/05/a-brief-glance-at-how-5-text-editors.htmlGoogle ScholarGoogle Scholar
  15. Ellis, C. A. and Gibbs, S. J. Concurrency control in groupware systems. ACM SIGMOD (1989), 399--407.Google ScholarGoogle Scholar
  16. Fan, H., Sun, C., and Shen, H.F. ATCoPE: any-time collaborative programming environment for seamless integration of real-time and non-real-time teamwork in software development, ACM GROUP (2012), 107--116.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Fraser, N. Differential Synchronization. ACM DocEng (2009), 13--20.Google ScholarGoogle Scholar
  18. Gentle, J. ShareJS: Collaborative editing in any app. https://github.com/josephg/ShareJS.Google ScholarGoogle Scholar
  19. Greenberg, S. and Marwood, D. Real time groupware as distributed system: concurrency control and its effect on the interface. ACM CSCW (1994), 207 -- 217.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Grudin, J. Why CSCW applications fail: problems in the design and evaluation of organizational interfaces. ACM CSCW (1988), 85--93.Google ScholarGoogle Scholar
  21. Gu, N., Yang, J. and Zhang, Q. Consistency maintenance based on the mark & retrace technique in groupware systems. ACM GROUP (2005), 264 -- 273.Google ScholarGoogle Scholar
  22. Gutwin, C. and Greenberg, S. The effects of workspace awareness support on the usability of real-time distributed groupware. ACM TOCHI, 6(3), 1993, 243--281.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Ignat, C. and Norrie, M.C. Customizable collaborative editor relying on treeOPT algorithm. ECSCW(2003), pp. 315 -- 334.Google ScholarGoogle Scholar
  24. Imine, A., Molli, P., Oster, G. and Rusinowitch, M. Proving correctness of transformation functions in real-time groupware. ECSCW (2003), 277 -- 293.Google ScholarGoogle Scholar
  25. Imine, A., Rusinowitch, M., Oster, G. and Molli, P. Formal design and verification of operational transformation algorithms for copies convergence. Theoretical Computer Science (2006), 351(2):167--183.Google ScholarGoogle Scholar
  26. Laird, Avery. Text Editor:Data Structures. www.averylaird.com/programming/the%20text%20editor/2017/09/30/the-piece-table.Google ScholarGoogle Scholar
  27. Lamport, L. Time, clocks, and the ordering of events in a distributed system. CACM 21, 7 (1978), 558--565.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Mihai Letia, M., Preguica, N., Shapiro, M. CRDTs: Consistency without concurrency control. RR-6956, INRIA. 2009.Google ScholarGoogle Scholar
  29. Li, R., Li, D. and Sun, C. A time interval based consistency control algorithm for interactive groupware applications. IEEE ICPADS (2004), 429--436.Google ScholarGoogle Scholar
  30. Li, D. and Li, R. Ensuring content and intention consistency in real-time group editors. IEEE ICDCS (2004), 748--755.Google ScholarGoogle ScholarCross RefCross Ref
  31. Li, R. and Li, D. A landmark-based transformation approach to concurrency control in group editors. ACM GROUP (2005), 284--293.Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Li, D. and Li, R. An approach to ensuring consistency in Peer-to-Peer real-time group editors. JCSCW 17, 5--6 (2008), 553 - 611.Google ScholarGoogle Scholar
  33. Li, D. and Li, R. An admissibility-based operational transformation framework for collaborative editing systems. JCSCW 19, 1 (2010): 1 -- 43.Google ScholarGoogle Scholar
  34. Liu, Y., Xu, Y., Zhang, S. and Sun, C. Formal verification of operational transformation. Proc. of 19th International Symposium on Formal Methods, 2014. LNCS Vol. 8442, 432--448.Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Lv, X., He, F., Cai, W., and Cheng, Y. A string-wise CRDT algorithm for smart and large-scale collaborative editing systems. Advanced Engineering Informatics (2017), 33: 397 - 409.Google ScholarGoogle Scholar
  36. Koch, M. and Schwabe, G. Interview with Jonathan Grudin on Computer-Supported Cooperative Work and Social Computing. Bus Inf Syst Eng. DOI 10.1007/ s12599-015-0377--1. Published online: 03 March 2015.Google ScholarGoogle Scholar
  37. MacFadden, M. The client stop and wait operational transformation control algorithm. Solute Consulting, San Diego, CA, 2013.Google ScholarGoogle Scholar
  38. MacFadden, M., Agustina, Ignat, C., Gu, N. and Sun, C. The fifteenth international workshop on collaborative editing systems. Companion of ACM CSCW (2017) workshop program, 351--354. http://cooffice.ntu.edu.sg/sigce/iwces15/.Google ScholarGoogle Scholar
  39. Nichols, D., Curtis, P., Dixon, M. and Lamping, J. High-latency, low-bandwidth windowing in the Jupiter collaboration system. ACM UIST (1995), 111--120.Google ScholarGoogle Scholar
  40. Nicolaescu, P., Jahns, K., Derntl, M., and Klamma, R. Near real-time peer-to-peer shared editing on extensible data types. ACM GROUP (2016), 39--49.Google ScholarGoogle Scholar
  41. Prakash, A. and Knister, M. A framework for undoing actions in collaborative systems. ACM TOCHI 1, 4 (1994), 295 -- 330.Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Preguic, N., Marquès, J. M., Shapiro, M, and Letia, M. A commutative replicated data type for cooperative editing. IEEE ICDCS (2009), 395--403.Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Oster, G., Urso, P., Molli, P. and Imine, A. Real time group editors without operational transformation. Research Report RR-5580, INRIA, May 2005.Google ScholarGoogle Scholar
  44. Oster, G., Urso, P., Molli, P. and Imine, A. Data consistency for p2p collaborative editing. ACM CSCW (2006), 259--268.Google ScholarGoogle Scholar
  45. Oster, G., Molli, P., Urso, P. and Imine, A. Tombstone transformation functions for ensuring consistency in collaborative editing systems. IEEE CollaborateCom (2006), 1--10.Google ScholarGoogle ScholarCross RefCross Ref
  46. Ressel, M., Ruhland, N. and Gunzenhauser, R. An integrating, transformation-oriented approach to concurrency control and undo in group editors. ACM CSCW (1996), 288 -- 297.Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Ressel, M. and Gunzenhauser, R. Reducing the problems of group undo. ACM GROUP (1999), 131--139.Google ScholarGoogle Scholar
  48. Roh, H.-G., Jeon, M., Kim, J.-S. and Lee, J. Replicated abstract data types: Building blocks for collaborative applications. JPDC, 71, 3. (2011), 354--368.Google ScholarGoogle Scholar
  49. Shao, B., Li, D., Lu, T. and Gu, N. An operational transformation based synchronization protocol for web 2.0 applications. ACM CSCW (2011), 563 -- 572.Google ScholarGoogle Scholar
  50. Shapiro, M. and Preguica, N. Designing a commutative replicated data type. arXiv:0710.1784v1 [cs.DC] 9 Oct 2007.Google ScholarGoogle Scholar
  51. Shapiro, M., Preguica, N., Baquero, C. and Zawirski, M. Conflict-free replicated data types. SSSDS (2011), 386--400.Google ScholarGoogle Scholar
  52. Shen, H.F. and Sun, C. Flexible notification for collaborative systems. ACM CSCW (2002), 77 -- 86.Google ScholarGoogle Scholar
  53. Shen, H.F. and Sun. C. Flexible Merging for Asynchronous Collaborative Systems, CoopIS (2002), 304 -- 321.Google ScholarGoogle ScholarCross RefCross Ref
  54. Shen, H.F. and Sun. C. A log compression algorithm for operation-based version control systems, Proc. of the 26th IEEE International Computer Software and Application Conf. (2002), 867 -- 872.Google ScholarGoogle Scholar
  55. Spiewak, D. Understanding and applying operational transformation. www.codecommit.com/blog/java/java/ understanding-and-applying-operational-transformation.Google ScholarGoogle Scholar
  56. Suleiman, M., Cart, M. and Ferrié, J. Serialization of concurrent operations in a distributed collaborative environment. ACM GROUP (1997), 435 -- 445.Google ScholarGoogle Scholar
  57. Suleiman, M., Cart, M. and Ferrié, J. Concurrent operations in a distributed and mobile collaborative environment. IEEE ICDE (1998), 36--45.Google ScholarGoogle ScholarCross RefCross Ref
  58. Sun, C., Jia, X., Zhang, Y., Yang, Y., and Chen, D. A generic operation transformation scheme for consistency maintenance in real-time cooperative editing systems. ACM GROUP (1997), 425 -- 434.Google ScholarGoogle Scholar
  59. Sun, C. and Ellis, C. Operational transformation in real-time group editors: issues, algorithms, and achievements. ACM CSCW (1998), 59 -- 68.Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. Sun, C., Jia, X., Zhang, Y., Yang, Y., and Chen, D. Achieving convergence, causality-preservation, and intention-preservation in real-time cooperative editing systems. ACM TOCHI 5, 1 (1998), 63 -- 108.Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Sun, C. Optional and responsive fine-grain locking in Internet-based collaborative systems," IEEE TPDS, 13, 9 (2002). 994--1008.Google ScholarGoogle Scholar
  62. Sun, C. Undo any operation at any time in group editors. ACM CSCW (2000). 191--200.Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. Sun, C. Undo as concurrent inverse in group editors. ACM TOCHI 9, 4 (2002), 309 -- 361.Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. Sun, C. Consistency maintenance in real-time collaborative editing systems. Talk and demo at Microsoft Research (Redmond, USA) in Feb 2003. Video: http://cooffice.ntu.edu.sg/coword/vods/lecture.htm.Google ScholarGoogle Scholar
  65. Sun, C., Xia, S., Sun, D., Chen, D., Shen, H. and Cai, W. Transparent adaptation of single-user applications for multi-user real-time collaboration. ACM TOCHI 13, 4 (2006), 531 -- 582.Google ScholarGoogle ScholarDigital LibraryDigital Library
  66. Sun, C. OTFAQ: operational transformation frequently asked questions. https://www3.ntu.edu.sg/home/czsun/ projects/otfaq/Google ScholarGoogle Scholar
  67. Sun, C. Issues and experiences in designing real-time collaborative editing systems. Tech talk and demo at Google (Mountain View, USA), 17 Nov, 2008. Video: https://www.youtube.com/watch?v=84zqbXUQIHc.Google ScholarGoogle Scholar
  68. Sun, C. Operational transformation theory and practice: empowering real world collaborative applications. ACM CSCW (2011) tutorial. http://cscw2011.org/program/t8.htmlGoogle ScholarGoogle Scholar
  69. Sun, C., Agustina, and Xu, Y. Exploring operational transformation: from core algorithms to real-world applications. ACM CSCW (2011) demo. http://cscw2011.org/program/demos.htmlGoogle ScholarGoogle Scholar
  70. Sun, D., Xia, S, Sun, C. and Chen, D. Operational transformation for collaborative word processing. ACM CSCW (2004), 437 -- 446.Google ScholarGoogle Scholar
  71. Sun, D. and Sun, C. Operation context and context-based operational transformation," ACM CSCW (2006), 279 -- 288.Google ScholarGoogle Scholar
  72. Sun, D. and Sun, C. Context-based operational transformation in distributed collaborative editing systems. IEEE TPDS 20, 10 (2009), 1454 -- 1470.Google ScholarGoogle Scholar
  73. Sun, D., Sun, C., Xia, S, and Shen, HF. Creative conflict resolution in collaborative editing systems. ACM CSCW (2012), 1411--1420.Google ScholarGoogle Scholar
  74. Sun, C. Wen, H. and Fan, H. Operational transformation for orthogonal conflict resolution in collaborative two-dimensional document editing systems. ACM CSCW (2012), 1391 -- 1400.Google ScholarGoogle Scholar
  75. Sun, C., Xu, Y. and Agustina. Exhaustive search of puzzles in operational transformation. ACM CSCW (2014), 519--529.Google ScholarGoogle Scholar
  76. Sun, C., Xu, Y. and Agustina. Exhaustive search and resolution of puzzles in OT systems supporting string-wise operations. ACM CSCW (2017), 2504 -- 2517.Google ScholarGoogle Scholar
  77. Sun, C. Some reflections on collaborative editing research: from academic curiosity to real-world application. IEEE CSCWD (2017), New Zealand, 10--17.Google ScholarGoogle Scholar
  78. Sun, C., Sun, D., Agustina, Cai, W., and Cho, B. Real differences between OT and CRDT under a general transformation framework for consistency maintenance in co-editors. PACMHCI, Vol. 4, GROUP, Article 6, (January 2020).Google ScholarGoogle ScholarDigital LibraryDigital Library
  79. Sun, D., Sun, C., Agustina, Cai, W. Real differences between OT and CRDT in building co-editing systems and real-world applications. https://arxiv.org/abs/1905.01517, May 2, 2019.Google ScholarGoogle Scholar
  80. Valdes, R. Text editors: algorithms and architectures, not much theory but a lot of practice. Dr.Dobb's J.(1993),38--43.Google ScholarGoogle Scholar
  81. Valdes, R. The secret sauce behind Google Wave. May 31, 2009. https://blogs.gartner.com/ray_valdes/2009/05/31/the-secret-sauce-behind-google-wave/.Google ScholarGoogle Scholar
  82. Vidot, N., Cart, M., Ferrie, J. and Suleiman, M. Copies convergence in a distributed real-time collaborative environment. ACM CSCW (2000), 171 -- 180.Google ScholarGoogle Scholar
  83. Wang, D., Mah, A. and Lassen, S. Google wave operational transformation. http://www.waveprotocol.org/whitepapers/ operational-transformGoogle ScholarGoogle Scholar
  84. Weiss, S., Urso, P. and Molli, P. Logoot: A scalable optimistic replication algorithm for collaborative editing on p2p networks. IEEE ICDCS (2009), 404--412.Google ScholarGoogle Scholar
  85. Weiss, S., Urso, P. and Molli, P. Wooki: a p2p wiki-based collaborative writing tool. WISE (2007). 503--512.Google ScholarGoogle Scholar
  86. Weiss, S., Urso, P. and Molli, P. Logoot-undo: Distributed collaborative editing system on p2p networks. IEEE TPDC 21, 8 (2010), 1162--1174.Google ScholarGoogle Scholar
  87. Xia, S., Sun, D., Sun, C., Shen, H.F. and Chen, D.: Leveraging single-user applications for multi-user collaboration: the CoWord approach, ACM CSCW (2004). 162--171.Google ScholarGoogle ScholarDigital LibraryDigital Library
  88. Xu, Y., Sun, C. and Li, M. Achieving convergence in operational transformation: conditions, mechanisms, and systems. ACM CSCW (2014), 505--518.Google ScholarGoogle ScholarDigital LibraryDigital Library
  89. Xu, Y. and Sun, C. Conditions and patterns for achieving convergence in OT-based co-editors. IEEE TPDC 27, 3 (2016), 695--709.Google ScholarGoogle Scholar

Index Terms

  1. Real Differences between OT and CRDT in Correctness and Complexity for Consistency Maintenance in Co-Editors

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!