Finding a provably correct subquadratic synchronization algorithm for many filesystem replicas is one of the main theoretical problems in Operational Transformation (OT) and Conflict-free Replicated Data Types (CRDT) frameworks. Based on the Algebraic Theory of Filesystems, which incorporates non-commutative filesystem commands natively, we developed and built a proof-of-concept implementation of an algorithm suite which synchronizes an arbitrary number of replicas. The result is provably correct, and the synchronized system is created in linear space and time after an initial sorting phase. It works by identifying conflicting command pairs and requesting one of the commands to be removed. The method can be guided to reach any of the theoretically possible synchronized states. The algorithm also allows asynchronous usage. After the client sends a synchronization request, the local replica remains available for further modifications. When the synchronization instructions arrive, they can be merged with the changes made since the synchronization request. The suite also works on filesystems with directed acyclic graph-based path structure in place of the traditional tree-like arrangement. Consequently, our algorithms apply to filesystems with hard or soft links as long as the links create no loops.
翻译:找到一种可证明正确的亚二次同步算法以处理多个文件系统副本,是操作变换(OT)和无冲突复制数据类型(CRDT)框架中的主要理论问题之一。基于融合了原生非交换文件系统命令的代数文件系统理论,我们开发并实现了一套用于同步任意数量副本的算法套件的概念验证系统。该算法可证明正确,且在初始排序阶段后,可在线性空间和时间复杂度内构建出同步系统。其工作原理是识别冲突的命令对,并请求移除其中一条命令。该方法可引导系统达到任意理论上的同步状态。该算法还支持异步使用:客户端发送同步请求后,本地副本仍可继续修改;当同步指令到达时,可与同步请求后产生的变更进行合并。该算法套件同样适用于基于有向无环图路径结构(而非传统树状结构)的文件系统。因此,只要链接不产生循环,我们的算法可应用于包含硬链接或软链接的文件系统。