Design and Performance Evaluation of a CRDT-Based Framework for Conflict-Free Real-Time Collaborative Web Applications
Authors/Creators
Description
Shared documents, whiteboards, design canvases and planning boards all rest on the same promise: several people can change the same thing at the same time, over flaky connections, and nobody ever ends up looking at a different version from everyone else. Most production tools keep that promise with operational transformation (OT), where a central server rewrites every concurrent edit before it is applied. That works, but it makes the server the bottleneck and turns offline work into a special case. Conflict-free replicated data types (CRDTs) take the server out of the correctness story, since every replica converges on its own, yet the textbook versions carry a reputation for bloated metadata, tombstones that never go away and full-state exchanges on every reconnect. In this paper we describe a browser-oriented CRDT framework built to shed those costs, and we measure how far it succeeds. The framework pairs a run-length encoded replicated growable array for text with an observed-remove map, a last-writer-wins register and a counter for structured state, all sharing one identifier scheme. Replicas synchronise by exchanging version-vector digests and then only the deltas the other side lacks, over WebSocket or WebRTC, with a causal buffer for out-of-order arrivals. A persistence layer snapshots the log and collects tombstones once a stable version vector shows that no replica can still need them. On an emulated testbed with up to 64 clients we compared the framework with a Jupiter-style OT server, a server-authoritative last-writer-wins baseline and a stripped-down per-character CRDT. With 16 clients on an 80 ms link, remote edits converged in 94 ms at the median and 146 ms at the 99th percentile, compared with 121 ms and 243 ms for OT, and the relay carried 41,000 operations per second. After 500,000 edits the stored document was 1.9 times the size of its visible text, where the naive CRDT reached 38 times and retained OT history 27 times. A client returning from a ten-minute outage was fully reconciled in 171 ms after exchanging 104 KB. No divergence appeared across 1.2 million randomised test interleavings. We close with practical guidance for teams choosing a collaboration engine.
Files
Design and Performance Evaluation of a CRDT-Based Framework for Conflict-Free Real-Time Collaborative Web Applications.pdf
Additional details
Dates
- Submitted
-
2026-09-17Nobody asks any more whether a web application should support simultaneous editing. They ask why it does not. A form that locks while a colleague is filling it in, a diagram that silently drops one person's change when two people draw at once, a wiki page that has to be refreshed before it can be saved: these are now read as defects, not as reasonable limitations. The expectation was set by a handful of very large products, and it has trickled down to internal dashboards, course platforms, ticketing systems and countless line-of-business tools built by teams with a fraction of the engineering budget that Google Docs had when it made the behaviour normal.
References
- Ahmed-Nacer, M., Ignat, C.-L., Oster, G., Roh, H.-G. and Urso, P. (2011) Evaluating CRDTs for real-time document editing. Proceedings of the 11th ACM Symposium on Document Engineering, pp.103-112. Available at: https://doi.org/10.1145/2034691.2034717 Almeida, P.S., Shoker, A. and Baquero, C. (2018) Delta state replicated data types. Journal of Parallel and Distributed Computing, 111, pp.162-173. Available at: https://doi.org/10.1016/j.jpdc.2017.08.003 Attiya, H., Burckhardt, S., Gotsman, A., Morrison, A., Yang, H. and Zawirski, M. (2016) Specification and complexity of collaborative text editing. Proceedings of the 2016 ACM Symposium on Principles of Distributed Computing, pp.259-268. Available at: https://doi.org/10.1145/2933057.2933090 Automerge (2024) Automerge: A library of data structures for building collaborative applications. Available at: https://automerge.org Baquero, C., Almeida, P.S. and Shoker, A. (2014) Making operation-based CRDTs operation-based. Distributed Applications and Interoperable Systems (DAIS 2014), Lecture Notes in Computer Science, 8460, pp.126-140. Available at: https://doi.org/10.1007/978-3-662-43352-2_11 Bieniusa, A., Zawirski, M., Preguica, N., Shapiro, M., Baquero, C., Balegas, V. and Duarte, S. (2012) An optimized conflict-free replicated set. arXiv preprint arXiv:1210.3368. Brewer, E. (2012) CAP twelve years later: How the "rules" have changed. Computer, 45(2), pp.23-29. Available at: https://doi.org/10.1109/MC.2012.37 Briot, L., Urso, P. and Shapiro, M. (2016) High responsiveness for group editing CRDTs. Proceedings of the 19th International Conference on Supporting Group Work, pp.51-60. Available at: https://doi.org/10.1145/2957276.2957300 Burckhardt, S., Gotsman, A., Yang, H. and Zawirski, M. (2014) Replicated data types: specification, verification, optimality. Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp.271-284. Available at: https://doi.org/10.1145/2535838.2535848 DeCandia, G., Hastorun, D., Jampani, M., Kakulapati, G., Lakshman, A., Pilchin, A., Sivasubramanian, S., Vosshall, P. and Vogels, W. (2007) Dynamo: Amazon's highly available key-value store. Proceedings of the 21st ACM SIGOPS Symposium on Operating Systems Principles, pp.205-220. Available at: https://doi.org/10.1145/1294261.1294281 Ellis, C.A. and Gibbs, S.J. (1989) Concurrency control in groupware systems. Proceedings of the 1989 ACM SIGMOD International Conference on Management of Data, pp.399-407. Available at: https://doi.org/10.1145/67544.66963 Enes, V., Almeida, P.S., Baquero, C. and Leitao, J. (2019) Efficient synchronization of state-based CRDTs. Proceedings of the 2019 IEEE 35th International Conference on Data Engineering, pp.148-159. Available at: https://doi.org/10.1109/ICDE.2019.00022 Fette, I. and Melnikov, A. (2011) The WebSocket Protocol. RFC 6455. Internet Engineering Task Force. Available at: https://doi.org/10.17487/RFC6455 Fidge, C.J. (1988) Timestamps in message-passing systems that preserve the partial ordering. Proceedings of the 11th Australian Computer Science Conference, 10(1), pp.56-66. Gilbert, S. and Lynch, N. (2002) Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web services. ACM SIGACT News, 33(2), pp.51-59. Available at: https://doi.org/10.1145/564585.564601 Gomes, V.B.F., Kleppmann, M., Mulligan, D.P. and Beresford, A.R. (2017) Verifying strong eventual consistency in distributed systems. Proceedings of the ACM on Programming Languages, 1(OOPSLA), Article 109. Available at: https://doi.org/10.1145/3133933 Jahns, K. (2023) Yjs: Shared data types for building collaborative software. Software. Available at: https://github.com/yjs/yjs Kleppmann, M. (2020) Moving elements in list CRDTs. Proceedings of the 7th Workshop on Principles and Practice of Consistency for Distributed Data, Article 4. Available at: https://doi.org/10.1145/3380787.3393677 Kleppmann, M. (2022) Making CRDTs Byzantine fault tolerant. Proceedings of the 9th Workshop on Principles and Practice of Consistency for Distributed Data, pp.8-15. Available at: https://doi.org/10.1145/3517209.3524042 Kleppmann, M. and Beresford, A.R. (2017) A conflict-free replicated JSON datatype. IEEE Transactions on Parallel and Distributed Systems, 28(10), pp.2733-2746. Available at: https://doi.org/10.1109/TPDS.2017.2697382 Kleppmann, M., Wiggins, A., van Hardenberg, P. and McGranaghan, M. (2019) Local-first software: You own your data, in spite of the cloud. Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, pp.154-178. Available at: https://doi.org/10.1145/3359591.3359737 Lamport, L. (1978) Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7), pp.558-565. Available at: https://doi.org/10.1145/359545.359563 Litt, G., Lim, S., Kleppmann, M. and van Hardenberg, P. (2022) Peritext: A CRDT for collaborative rich text editing. Proceedings of the ACM on Human-Computer Interaction, 6(CSCW2), Article 531. Available at: https://doi.org/10.1145/3555644 Mattern, F. (1989) Virtual time and global states of distributed systems. In: Cosnard, M. et al. (eds.) Parallel and Distributed Algorithms. Amsterdam: North-Holland, pp.215-226. Nedelec, B., Molli, P., Mostefaoui, A. and Desmontils, E. (2013) LSEQ: An adaptive structure for sequences in distributed collaborative editing. Proceedings of the 2013 ACM Symposium on Document Engineering, pp.37-46. Available at: https://doi.org/10.1145/2494266.2494278 Nichols, D.A., Curtis, P., Dixon, M. and Lamping, J. (1995) High-latency, low-bandwidth windowing in the Jupiter collaboration system. Proceedings of the 8th Annual ACM Symposium on User Interface and Software Technology, pp.111-120. Available at: https://doi.org/10.1145/215585.215706 Nicolaescu, P., Jahns, K., Derntl, M. and Klamma, R. (2016) Near real-time peer-to-peer shared editing on extensible data types. Proceedings of the 19th International Conference on Supporting Group Work, pp.39-49. Available at: https://doi.org/10.1145/2957276.2957310 Oster, G., Urso, P., Molli, P. and Imine, A. (2006) Data consistency for P2P collaborative editing. Proceedings of the 2006 20th Anniversary Conference on Computer Supported Cooperative Work, pp.259-268. Available at: https://doi.org/10.1145/1180875.1180916 Preguica, N. (2018) Conflict-free replicated data types: An overview. arXiv preprint arXiv:1806.10254. Preguica, N., Marques, J.M., Shapiro, M. and Letia, M. (2009) A commutative replicated data type for cooperative editing. Proceedings of the 2009 29th IEEE International Conference on Distributed Computing Systems, pp.395-403. Available at: https://doi.org/10.1109/ICDCS.2009.20 Roh, H.-G., Jeon, M., Kim, J.-S. and Lee, J. (2011) Replicated abstract data types: Building blocks for collaborative applications. Journal of Parallel and Distributed Computing, 71(3), pp.354-368. Available at: https://doi.org/10.1016/j.jpdc.2010.12.006 Saito, Y. and Shapiro, M. (2005) Optimistic replication. ACM Computing Surveys, 37(1), pp.42-81. Available at: https://doi.org/10.1145/1057977.1057980 Shapiro, M., Preguica, N., Baquero, C. and Zawirski, M. (2011a) Conflict-free replicated data types. Stabilization, Safety, and Security of Distributed Systems (SSS 2011), Lecture Notes in Computer Science, 6976, pp.386-400. Available at: https://doi.org/10.1007/978-3-642-24550-3_29 Shapiro, M., Preguica, N., Baquero, C. and Zawirski, M. (2011b) A comprehensive study of Convergent and Commutative Replicated Data Types. Research Report RR-7506. INRIA. Sun, C. and Ellis, C. (1998) Operational transformation in real-time group editors: Issues, algorithms, and achievements. Proceedings of the 1998 ACM Conference on Computer Supported Cooperative Work, pp.59-68. Available at: https://doi.org/10.1145/289444.289469 Sun, C., Jia, X., Zhang, Y., Yang, Y. and Chen, D. (1998) Achieving convergence, causality preservation, and intention preservation in real-time cooperative editing systems. ACM Transactions on Computer-Human Interaction, 5(1), pp.63-108. Available at: https://doi.org/10.1145/274444.274447 Sun, D., Sun, C., Ng, A. and Cai, W. (2020) Real differences between OT and CRDT in correctness and complexity for consistency maintenance in co-editors. Proceedings of the ACM on Human-Computer Interaction, 4(CSCW1), Article 21. Available at: https://doi.org/10.1145/3392825 Terry, D.B., Theimer, M.M., Petersen, K., Demers, A.J., Spreitzer, M.J. and Hauser, C.H. (1995) Managing update conflicts in Bayou, a weakly connected replicated storage system. Proceedings of the 15th ACM Symposium on Operating Systems Principles, pp.172-182. Available at: https://doi.org/10.1145/224056.224070 Vogels, W. (2009) Eventually consistent. Communications of the ACM, 52(1), pp.40-44. Available at: https://doi.org/10.1145/1435417.1435432 W3C (2021) WebRTC 1.0: Real-Time Communication Between Browsers. W3C Recommendation, 26 January 2021. Available at: https://www.w3.org/TR/webrtc/ Wallace, E. (2019) How Figma's multiplayer technology works. Figma Engineering Blog. Available at: https://www.figma.com/blog/how-figmas-multiplayer-technology-works/ Weiss, S., Urso, P. and Molli, P. (2009) Logoot: A scalable optimistic replication algorithm for collaborative editing on P2P networks. Proceedings of the 2009 29th IEEE International Conference on Distributed Computing Systems, pp.404-412. Available at: https://doi.org/10.1109/ICDCS.2009.75 Yu, W. and Rostad, S. (2020) A low-cost set CRDT based on causal lengths. Proceedings of the 7th Workshop on Principles and Practice of Consistency for Distributed Data, Article 5. Available at: https://doi.org/10.1145/3380787.3393678