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.
翻译:冲突无关复制数据类型(CRDT)允许协作访问应用程序的数据。我们描述了一种新的CRDT操作,即适用于CRDT列表的for-each操作,并展示了它在协作应用程序中的应用。我们的for-each操作对列表中的每个元素应用给定的突变,包括同时插入的元素。这通常以一种保护用户意图的方式来实现,否则需要自定义CRDT算法。我们给出了将for-each操作应用于协作富文本、食谱和幻灯片编辑器的示例应用。