Peritext: A CRDT for Collaborative Rich Text Editing

Author:

Litt Geoffrey1,Lim Sarah2,Kleppmann Martin3,van Hardenberg Peter4

Affiliation:

1. Massachusetts Institute of Technology, Cambridge, MA, USA

2. UC Berkeley, Berkeley, CA, USA

3. University of Cambridge, Cambridge, United Kingdom

4. Ink & Switch, San Francisco, CA, USA

Abstract

Conflict-Free Replicated Data Types (CRDTs) support decentralized collaborative editing of shared data, enabling peer-to-peer sharing and flexible branching and merging workflows. While there is extensive work on CRDTs for plain text, much less is known about CRDTs for rich text with formatting. No algorithms have been published, and existing open-source implementations do not always preserve user intent. In this paper, we describe a model of intent preservation in rich text editing, developed through a series of concurrent editing scenarios. We then describe Peritext, a CRDT algorithm for rich text that satisfies the criteria of our model. The key idea is to store formatting spans alongside the plaintext character sequence, linked to a stable identifier for the first and last character of each span, and then to derive the final formatted text from these spans in a deterministic way that ensures concurrent operations commute. We have prototyped our algorithm in TypeScript, validated it using randomized property-based testing, and integrated it with an editor UI. We also prove that our algorithm ensures convergence, and demonstrate its causality preservation and intention preservation properties.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Networks and Communications,Human-Computer Interaction,Social Sciences (miscellaneous)

Reference52 articles.

1. Supporting Adaptable Granularity of Changes for Massive-scale Collaborative Editing

2. Carlos Baquero , Paulo Sérgio Almeida, and Ali Shoker . 2017 . Pure Operation-Based Replicated Data Types . arXiv:1710.04469 https://arxiv.org/abs/1710.04469 Carlos Baquero, Paulo Sérgio Almeida, and Ali Shoker. 2017. Pure Operation-Based Replicated Data Types. arXiv:1710.04469 https://arxiv.org/abs/1710.04469

3. Lightweight causal and atomic group multicast

4. High Responsiveness for Group Editing CRDTs

5. Christian Cachin , Rachid Guerraoui , and Luís Rodrigues . 2011. Introduction to Reliable and Secure Distributed Programming ( second ed.). Springer . https://doi.org/10.1007/978--3--642--15260--3 10.1007/978--3--642--15260--3 Christian Cachin, Rachid Guerraoui, and Luís Rodrigues. 2011. Introduction to Reliable and Secure Distributed Programming (second ed.). Springer. https://doi.org/10.1007/978--3--642--15260--3

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Efficient Synchronization of CRDTs using VCube-PS;12th Latin-American Symposium on Dependable and Secure Computing;2023-10-16

2. A Study of Semantics for CRDT-based Collaborative Spreadsheets;Proceedings of the 10th Workshop on Principles and Practice of Consistency for Distributed Data;2023-05-08

3. For-Each Operations in Collaborative Apps;Proceedings of the 10th Workshop on Principles and Practice of Consistency for Distributed Data;2023-05-08

4. Efficient CRDT Synchronization at Scale using a Causal Multicast over a Virtual Hypercube Overlay;Proceedings of the 11th Latin-American Symposium on Dependable Computing;2022-11-21

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3