Conflict-free Replicated Data Types (CRDTs) allow collaborative access to an app's data. We describe a novel CRDT operation, for-each on the list of CRDTs, and demonstrate its use in collaborative apps. Our for-each operation applies a given mutation to each element of a list, including elements inserted concurrently. This often preserves user intention in a way that would otherwise require custom CRDT algorithms. We give example applications of our for-each operation to collaborative rich-text, recipe, and slideshow editors.
翻译:无冲突复制数据类型(CRDTs)支持对应用数据的协作访问。我们描述了一种新颖的CRDT操作——作用于CRDT列表上的for-each操作,并展示了其在协作式应用中的用途。该for-each操作将给定的变更操作应用于列表中的每个元素(包括并发插入的元素)。这通常能以其他方式需要定制CRDT算法才能实现的效果来保留用户意图。我们给出了for-each操作在协作式富文本编辑器、食谱编辑器和幻灯片编辑器中的应用实例。