skip to main content
research-article

Real Differences between OT and CRDT under a General Transformation Framework for Consistency Maintenance in Co-Editors

Published: 04 January 2020 Publication History

Abstract

OT (Operational Transformation) was invented for supporting real-time co-editors in the late 1980s and has evolved to become a collection of core techniques widely used in today's working co-editors and adopted in major 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 commutativity in co-editors. On top of that, CRDT solutions have made broad claims of superiority over OT solutions, and routinely portrayed OT as an incorrect, complex and inefficient technique. Over one decade later, however, CRDT is rarely found in working co-editors, and 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 research and developer communities. Have the vast majority of co-editors been unfortunate in choosing the faulty and inferior OT, or those CRDT claims are false? What are the real differences between OT and CRDT for co-editors? What are the key factors and underlying reasons behind the choices between OT and CRDT in the real world? A thorough examination of these questions is relevant not only to researchers who are exploring the frontiers of co-editing technologies and systems, but also to practitioners who are seeking viable techniques to build real world applications. 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. We report our discoveries in a series of articles and the current article is the first one in this series. In this paper, we present a general transformation framework for consistency maintenance in co-editors, which was distilled from dissecting and examining representative OT and CRDT solutions (and other alternative solutions) during this work, and report our discoveries under the guidance of this framework. In particular, we reveal that CRDT is like OT in following a general transformation approach, but achieves the same transformation indirectly, in contrast to OT direct transformation approach; and CRDT is not natively commutative for concurrent co-editing operations, but has to achieve the same OT commutativity indirectly as well, with consequential correctness and complexity issues. Uncovering the hidden transformation nature and demystifying the commutativity property of CRDT provides much-needed clarity about what CRDT really is and is not to co-editing, and serves as the foundation to explore the real differences between OT and CRDT in correctness, complexity, implementation, and real world applications, which are reported in follow-up articles. We hope discoveries from this work help clear up common misconceptions 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.
[2]
Agustina and Sun. C. Dependency-conflict detection in real-time collaborative 3D design systems. ACM CSCW (2013), 715--728.
[3]
Agustina and Sun, C. Operational transformation for real-time synchronization of shared workspace in cloud storage. ACM GROUP (2016), 61--70.
[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.
[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.
[6]
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.
[7]
Boucheneb, B. and Imine. A. On model-checking optimistic replication algorithms. FORTE on Formal Techniques for Distributed Systems (2009), 73 -- 89.
[8]
Briot, L. Urso, P. and Shapiro, M. High responsiveness for group editing CRDTs. ACM GROUP (2016), 51--60.
[9]
Cho, B., Sun, C. and Agustina. Issues and Experiences in Building Heterogeneous Co-Editing Systems. PACMHCI, Vol. 3, No. GROUP, Article 245, (December 2019).
[10]
Crowley, C. Data structures for text sequences. Computer Science Department, University of New Mexico, 1996. http://www.cs.unm.edu/~crowley/papers/sds/sds.html.
[11]
Davis, A., Sun, C. and Lu, J. Generalizing operational transformation to the standard general markup language. ACM CSCW (2002), 58--67.
[12]
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.html.
[13]
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.html.
[14]
Ellis, C. A. and Gibbs, S. J. Concurrency control in groupware systems. ACM SIGMOD (1989), 399--407.
[15]
Fraser, N. Differential Synchronization. ACM DocEng (2009), 13--20.
[16]
Gentle, J. ShareJS: Collaborative editing in any app. https://github.com/josephg/ShareJS.
[17]
Greenberg, S. and Marwood, D. Real time groupware as distributed system: concurrency control and its effect on the interface. ACM CSCW (1994), 207 -- 217.
[18]
Grudin, J. Why CSCW applications fail: problems in the design and evaluation of organizational interfaces. ACM CSCW (1988), 85--93.
[19]
Gu, N., Yang, J. and Zhang, Q. Consistency maintenance based on the mark & retrace technique in groupware systems. ACM GROUP (2005), 264 -- 273.
[20]
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.
[21]
Ignat, C. and Norrie, M.C. Customizable collaborative editor relying on treeOPT algorithm. ECSCW (2003), 315--334.
[22]
Imine, A., Molli, P., Oster, G. and Rusinowitch, M. Proving correctness of transformation functions in real-time groupware. ECSCW (2003), 277 -- 293.
[23]
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.
[24]
Laird, Avery. Text Editor:Data Structures. www.averylaird.com/programming/the%20text%20editor/2017/09/30/the-piece-table.
[25]
Lamport, L. Time, clocks, and the ordering of events in a distributed system. CACM 21, 7 (1978), 558--565.
[26]
Mihai Letia, M., Preguica, N., Shapiro, M. CRDTs: Consistency without concurrency control. RR-6956, INRIA. 2009.
[27]
Li, R., Li, D. and Sun, C. A time interval based consistency control algorithm for interactive groupware applications. IEEE ICPADS (2004), 429--436.
[28]
Li, D. and Li, R. Ensuring content and intention consistency in real-time group editors. IEEE ICDCS (2004), 748--755.
[29]
Li, R. and Li, D. A landmark-based transformation approach to concurrency control in group editors. ACM GROUP (2005), 284--293.
[30]
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.
[31]
Li, D. and Li, R. An admissibility-based operational transformation framework for collaborative editing systems. JCSCW 19, 1 (2010): 1 -- 43.
[32]
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.
[33]
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.
[34]
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.
[35]
MacFadden, M. The client stop and wait operational transformation control algorithm. Solute Consulting, San Diego, CA, 2013.
[36]
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/
[37]
Nichols, D., Curtis, P., Dixon, M. and Lamping, J. High-latency, low-bandwidth windowing in the Jupiter collaboration system. ACM UIST (1995), 111--120.
[38]
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.
[39]
Prakash, A. and Knister, M. A framework for undoing actions in collaborative systems. ACM TOCHI 1, 4 (1994), 295 -- 330.
[40]
Preguic, N., Marquès, J. M., Shapiro, M, and Letia, M. A commutative replicated data type for cooperative editing. IEEE ICDCS (2009), 395--403.
[41]
Oster, G., Urso, P., Molli, P. and Imine, A. Real time group editors without operational transformation. Research Report RR-5580, INRIA, May 2005.
[42]
Oster, G., Urso, P., Molli, P. and Imine, A. Data consistency for p2p collaborative editing. ACM CSCW (2006), 259--268.
[43]
Oster, G., Molli, P., Urso, P. and Imine, A. Tombstone transformation functions for ensuring consistency in collaborative editing systems. IEEE CollaborateCom (2006), 1--10.
[44]
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.
[45]
Ressel, M. and Gunzenhauser, R. Reducing the problems of group undo. ACM GROUP (1999), 131--139.
[46]
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.
[47]
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.
[48]
Shapiro, M. and Preguica, N. Designing a commutative replicated data type. arXiv:0710.1784v1 [cs.DC] 9 Oct 2007.
[49]
Shapiro, M., Preguica, N., Baquero, C. and Zawirski, M. Conflict-free replicated data types. SSSDS (2011), 386--400.
[50]
Shen, H.F. and Sun, C. Flexible notification for collaborative systems. ACM CSCW (2002), 77 -- 86.
[51]
Spiewak, D. Understanding and applying operational transformation. www.codecommit.com/blog/java/java/ understanding-and-applying-operational-transformation.
[52]
Suleiman, M., Cart, M. and Ferrié, J. Serialization of concurrent operations in a distributed collaborative environment. ACM GROUP (1997), 435 -- 445.
[53]
Suleiman, M., Cart, M. and Ferrié, J. Concurrent operations in a distributed and mobile collaborative environment. IEEE ICDE (1998), 36--45.
[54]
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.
[55]
Sun, C. and Ellis, C. Operational transformation in real-time group editors: issues, algorithms, and achievements. ACM CSCW (1998), 59 -- 68.
[56]
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.
[57]
Sun, C. Optional and responsive fine-grain locking in Internet-based collaborative systems," IEEE TPDS, 13, 9 (2002). 994--1008.
[58]
Sun, C. Undo any operation at any time in group editors. ACM CSCW (2000). 191--200.
[59]
Sun, C. Undo as concurrent inverse in group editors. ACM TOCHI 9, 4 (2002), 309 -- 361.
[60]
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.
[61]
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.
[62]
Sun, C. OTFAQ: operational transformation frequently asked questions. http://cooffice.ntu.edu.sg/otfaq.
[63]
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.
[64]
Sun, C. Operational transformation theory and practice: empowering real world collaborative applications. ACM CSCW (2011) tutorial. http://cscw2011.org/program/t8.html
[65]
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.html.
[66]
Sun, D., Xia, S, Sun, C. and Chen, D. Operational transformation for collaborative word processing. ACM CSCW (2004), 437 -- 446.
[67]
Sun, D. and Sun, C. Operation context and context-based operational transformation," ACM CSCW (2006), 279 -- 288.
[68]
Sun, D. and Sun, C. Context-based operational transformation in distributed collaborative editing systems. IEEE TPDS 20, 10 (2009), 1454 -- 1470.
[69]
Sun, D., Sun, C., Xia, S, and Shen, HF. Creative conflict resolution in collaborative editing systems. ACM CSCW (2012), 1411--1420.
[70]
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.
[71]
Sun, C., Xu, Y. and Agustina. Exhaustive search of puzzles in operational transformation. ACM CSCW (2014), 519--529.
[72]
Sun, C., Xu, Y. and Agustina. Exhaustive search and resolution of puzzles in OT systems supporting string-wise operations. ACM CSCW (2017), 2504 -- 2517.
[73]
Sun, C. Some reflections on collaborative editing research: from academic curiosity to real-world application. IEEE CSCWD (2017), New Zealand, 10--17.
[74]
Sun, D., Sun, C., Agustina, Cai, W. Real differences between OT and CRDT in correctness and complexity for co-editors. To appear in Proceedings of the ACM on Human-Computer Interaction, CSCW 2020. An early version is available at https://arxiv.org/abs/1905.01302, May 2, 2019.
[75]
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.
[76]
Valdes, R. Text editors: algorithms and architectures, not much theory but a lot of practice. Dr.Dobb's J. (1993),38--43.
[77]
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/ .
[78]
Vidot, N., Cart, M., Ferrie, J. and Suleiman, M. Copies convergence in a distributed real-time collaborative environment. ACM CSCW (2000), 171 -- 180.
[79]
Wang, D., Mah, A. and Lassen, S. Google wave operational transformation. http://www.waveprotocol.org/whitepapers/operational-transform .
[80]
Weiss, S., Urso, P. and Molli, P. Logoot: A scalable optimistic replication algorithm for collaborative editing on p2p networks. IEEE ICDCS (2009), 404--412.
[81]
Weiss, S., Urso, P. and Molli, P. Wooki: a p2p wiki-based collaborative writing tool. WISE (2007). 503--512.
[82]
Weiss, S., Urso, P. and Molli, P. Logoot-undo: Distributed collaborative editing system on p2p networks. IEEE TPDC 21, 8 (2010), 1162--1174.
[83]
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.
[84]
Xu, Y., Sun, C. and Li, M. Achieving convergence in operational transformation: conditions, mechanisms, and systems. ACM CSCW (2014), 505--518.
[85]
Xu, Y. and Sun, C. Conditions and patterns for achieving convergence in OT-based co-editors. IEEE TPDC 27, 3 (2016), 695--709.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Human-Computer Interaction
Proceedings of the ACM on Human-Computer Interaction  Volume 4, Issue GROUP
GROUP
January 2020
405 pages
EISSN:2573-0142
DOI:10.1145/3378060
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 January 2020
Published in PACMHCI Volume 4, Issue GROUP

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. commutative replicated data type (crdt)
  2. computer supported cooperative work (cscw) and social computing
  3. concurrency control
  4. consistency maintenance
  5. distributed/internet/cloud computing technologies and systems
  6. operational transformation (ot)
  7. real-time collaborative editing

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)31
  • Downloads (Last 6 weeks)7
Reflects downloads up to 15 Sep 2024

Other Metrics

Citations

Cited By

View all

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media