Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

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

Published: 29 May 2020 Publication History

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.
[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]
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.
[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.
[8]
Boucheneb, B. and Imine. A. On model-checking optimistic replication algorithms. FORTE on Formal Techniques for Distributed Systems (2009), 73 -- 89.
[9]
Briot, L. Urso, P. and Shapiro, M. High responsiveness for group editing CRDTs. ACM GROUP (2016), 51--60.
[10]
Cho, B., Sun, C. and Agustina. Issues and Experiences in Building Heterogeneous Co-Editing Systems. PACMHCI, Vol. 3, GROUP, Article 245, (December 2019).
[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.html
[12]
Davis, A., Sun, C. and Lu, J. Generalizing operational transformation to the standard general markup language. ACM CSCW (2002), 58--67.
[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.html
[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.html
[15]
Ellis, C. A. and Gibbs, S. J. Concurrency control in groupware systems. ACM SIGMOD (1989), 399--407.
[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.
[17]
Fraser, N. Differential Synchronization. ACM DocEng (2009), 13--20.
[18]
Gentle, J. ShareJS: Collaborative editing in any app. https://github.com/josephg/ShareJS.
[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.
[20]
Grudin, J. Why CSCW applications fail: problems in the design and evaluation of organizational interfaces. ACM CSCW (1988), 85--93.
[21]
Gu, N., Yang, J. and Zhang, Q. Consistency maintenance based on the mark & retrace technique in groupware systems. ACM GROUP (2005), 264 -- 273.
[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.
[23]
Ignat, C. and Norrie, M.C. Customizable collaborative editor relying on treeOPT algorithm. ECSCW(2003), pp. 315 -- 334.
[24]
Imine, A., Molli, P., Oster, G. and Rusinowitch, M. Proving correctness of transformation functions in real-time groupware. ECSCW (2003), 277 -- 293.
[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.
[26]
Laird, Avery. Text Editor:Data Structures. www.averylaird.com/programming/the%20text%20editor/2017/09/30/the-piece-table.
[27]
Lamport, L. Time, clocks, and the ordering of events in a distributed system. CACM 21, 7 (1978), 558--565.
[28]
Mihai Letia, M., Preguica, N., Shapiro, M. CRDTs: Consistency without concurrency control. RR-6956, INRIA. 2009.
[29]
Li, R., Li, D. and Sun, C. A time interval based consistency control algorithm for interactive groupware applications. IEEE ICPADS (2004), 429--436.
[30]
Li, D. and Li, R. Ensuring content and intention consistency in real-time group editors. IEEE ICDCS (2004), 748--755.
[31]
Li, R. and Li, D. A landmark-based transformation approach to concurrency control in group editors. ACM GROUP (2005), 284--293.
[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.
[33]
Li, D. and Li, R. An admissibility-based operational transformation framework for collaborative editing systems. JCSCW 19, 1 (2010): 1 -- 43.
[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.
[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.
[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.
[37]
MacFadden, M. The client stop and wait operational transformation control algorithm. Solute Consulting, San Diego, CA, 2013.
[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/.
[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.
[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.
[41]
Prakash, A. and Knister, M. A framework for undoing actions in collaborative systems. ACM TOCHI 1, 4 (1994), 295 -- 330.
[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.
[43]
Oster, G., Urso, P., Molli, P. and Imine, A. Real time group editors without operational transformation. Research Report RR-5580, INRIA, May 2005.
[44]
Oster, G., Urso, P., Molli, P. and Imine, A. Data consistency for p2p collaborative editing. ACM CSCW (2006), 259--268.
[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.
[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.
[47]
Ressel, M. and Gunzenhauser, R. Reducing the problems of group undo. ACM GROUP (1999), 131--139.
[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.
[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.
[50]
Shapiro, M. and Preguica, N. Designing a commutative replicated data type. arXiv:0710.1784v1 [cs.DC] 9 Oct 2007.
[51]
Shapiro, M., Preguica, N., Baquero, C. and Zawirski, M. Conflict-free replicated data types. SSSDS (2011), 386--400.
[52]
Shen, H.F. and Sun, C. Flexible notification for collaborative systems. ACM CSCW (2002), 77 -- 86.
[53]
Shen, H.F. and Sun. C. Flexible Merging for Asynchronous Collaborative Systems, CoopIS (2002), 304 -- 321.
[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.
[55]
Spiewak, D. Understanding and applying operational transformation. www.codecommit.com/blog/java/java/ understanding-and-applying-operational-transformation.
[56]
Suleiman, M., Cart, M. and Ferrié, J. Serialization of concurrent operations in a distributed collaborative environment. ACM GROUP (1997), 435 -- 445.
[57]
Suleiman, M., Cart, M. and Ferrié, J. Concurrent operations in a distributed and mobile collaborative environment. IEEE ICDE (1998), 36--45.
[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.
[59]
Sun, C. and Ellis, C. Operational transformation in real-time group editors: issues, algorithms, and achievements. ACM CSCW (1998), 59 -- 68.
[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.
[61]
Sun, C. Optional and responsive fine-grain locking in Internet-based collaborative systems," IEEE TPDS, 13, 9 (2002). 994--1008.
[62]
Sun, C. Undo any operation at any time in group editors. ACM CSCW (2000). 191--200.
[63]
Sun, C. Undo as concurrent inverse in group editors. ACM TOCHI 9, 4 (2002), 309 -- 361.
[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.
[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.
[66]
Sun, C. OTFAQ: operational transformation frequently asked questions. https://www3.ntu.edu.sg/home/czsun/ projects/otfaq/
[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.
[68]
Sun, C. Operational transformation theory and practice: empowering real world collaborative applications. ACM CSCW (2011) tutorial. http://cscw2011.org/program/t8.html
[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.html
[70]
Sun, D., Xia, S, Sun, C. and Chen, D. Operational transformation for collaborative word processing. ACM CSCW (2004), 437 -- 446.
[71]
Sun, D. and Sun, C. Operation context and context-based operational transformation," ACM CSCW (2006), 279 -- 288.
[72]
Sun, D. and Sun, C. Context-based operational transformation in distributed collaborative editing systems. IEEE TPDS 20, 10 (2009), 1454 -- 1470.
[73]
Sun, D., Sun, C., Xia, S, and Shen, HF. Creative conflict resolution in collaborative editing systems. ACM CSCW (2012), 1411--1420.
[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.
[75]
Sun, C., Xu, Y. and Agustina. Exhaustive search of puzzles in operational transformation. ACM CSCW (2014), 519--529.
[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.
[77]
Sun, C. Some reflections on collaborative editing research: from academic curiosity to real-world application. IEEE CSCWD (2017), New Zealand, 10--17.
[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).
[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.
[80]
Valdes, R. Text editors: algorithms and architectures, not much theory but a lot of practice. Dr.Dobb's J.(1993),38--43.
[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/.
[82]
Vidot, N., Cart, M., Ferrie, J. and Suleiman, M. Copies convergence in a distributed real-time collaborative environment. ACM CSCW (2000), 171 -- 180.
[83]
Wang, D., Mah, A. and Lassen, S. Google wave operational transformation. http://www.waveprotocol.org/whitepapers/ operational-transform
[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.
[85]
Weiss, S., Urso, P. and Molli, P. Wooki: a p2p wiki-based collaborative writing tool. WISE (2007). 503--512.
[86]
Weiss, S., Urso, P. and Molli, P. Logoot-undo: Distributed collaborative editing system on p2p networks. IEEE TPDC 21, 8 (2010), 1162--1174.
[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.
[88]
Xu, Y., Sun, C. and Li, M. Achieving convergence in operational transformation: conditions, mechanisms, and systems. ACM CSCW (2014), 505--518.
[89]
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
  • (2024)Decentralized Near-Synchronous Local-First Programming CollaborationProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3685555(1909-1911)Online publication date: 11-Sep-2024
  • (2024)Using Web Audio Modules for Immersive Audio Collaboration in the Musical Metaverse2024 IEEE 5th International Symposium on the Internet of Sounds (IS2)10.1109/IS262782.2024.10704108(1-10)Online publication date: 30-Sep-2024
  • (2023)The Online Pause and Resume Problem: Optimal Algorithms and An Application to Carbon-Aware Load ShiftingProceedings of the ACM on Measurement and Analysis of Computing Systems10.1145/36267767:3(1-32)Online publication date: 12-Dec-2023
  • Show More Cited By

Index Terms

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

    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 CSCW1
    CSCW
    May 2020
    1285 pages
    EISSN:2573-0142
    DOI:10.1145/3403424
    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: 29 May 2020
    Published in PACMHCI Volume 4, Issue CSCW1

    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
    6. operational transformation (OT)
    7. real-time co-editing

    Qualifiers

    • Research-article

    Funding Sources

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)92
    • Downloads (Last 6 weeks)8
    Reflects downloads up to 17 Oct 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Decentralized Near-Synchronous Local-First Programming CollaborationProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3685555(1909-1911)Online publication date: 11-Sep-2024
    • (2024)Using Web Audio Modules for Immersive Audio Collaboration in the Musical Metaverse2024 IEEE 5th International Symposium on the Internet of Sounds (IS2)10.1109/IS262782.2024.10704108(1-10)Online publication date: 30-Sep-2024
    • (2023)The Online Pause and Resume Problem: Optimal Algorithms and An Application to Carbon-Aware Load ShiftingProceedings of the ACM on Measurement and Analysis of Computing Systems10.1145/36267767:3(1-32)Online publication date: 12-Dec-2023
    • (2023)Near-optimal Online Algorithms for Joint Pricing and Scheduling in EV Charging NetworksProceedings of the 14th ACM International Conference on Future Energy Systems10.1145/3575813.3576878(72-83)Online publication date: 20-Jun-2023
    • (2023)LaserShoes: Low-Cost Ground Surface Detection Using Laser Speckle ImagingProceedings of the 2023 CHI Conference on Human Factors in Computing Systems10.1145/3544548.3581344(1-20)Online publication date: 19-Apr-2023
    • (2023)Building Temporary Isolated Workspace in Real-Time Collaborative Programming Environment2023 IEEE International Conference on Systems, Man, and Cybernetics (SMC)10.1109/SMC53992.2023.10394060(4110-4115)Online publication date: 1-Oct-2023
    • (2022)Self‐compressing object sequence for consistency maintenance in co‐editorsSoftware: Practice and Experience10.1002/spe.309052:8(1802-1825)Online publication date: 21-Apr-2022
    • (2021)Feature Extraction of Broken Glass Cracks in Road Traffic Accident Site Based on Deep LearningComplexity10.1155/2021/55270762021Online publication date: 1-Jan-2021
    • (2021)RFTempProceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies10.1145/34949675:4(1-25)Online publication date: 27-Dec-2021
    • (2021)Competitive Algorithms for Online Multidimensional Knapsack ProblemsProceedings of the ACM on Measurement and Analysis of Computing Systems10.1145/34910425:3(1-30)Online publication date: 15-Dec-2021

    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