摘要:
This paper proposes a consistency maintenance algorithm called ORT, to support operation re-transfer in three-stage net-work. We divide network statues into three stages:break-before,break-after and connect-after,and equip OTR algorithm on the server, in the break-before phase,receives and broadcasts operations,updates the value of cursor periodically;in the break-after phase,packs the operations according to cursor and net attributes;in the connect-after phase,captures the lost and missed operations,and broadcasts them to corresponding sites. In order to improve the efficiency of checking and synchronization,we use tree model to construct the set of history buffer,and introduce compress function into ORT algorithm. In this paper,a prototype system Co-Editor which can support multi-user collaboration in the website is developed based on the open-source text editor packageUEditor,which validates the whole strategy.%针对网络潜在的不稳定现象,提出支持断网续传的网络三阶段一致性维护算法,我们简称为ORT算法.该算法将网络状态划分为断网前、断网后、联网后三阶段,在之前的支持两站点协同的移动网络协同副本一致性维护算法基础上,引入服务器,实现多用户协同工作.ORT算法配置在服务器端,断网前收发操作并定时更新cursor值,断网后根据站点id和操作net值将操作保存在指定缓冲区,联网后通过三个步骤的处理,查找漏发和丢失操作,并广播到对应站点执行,最终生成一致性副本.为了优化查询、同步效率,服务器端选用树形结构存储各协作站点的历史操作序列,并将压缩策略进行适当更改引用到本算法中.本文最后通过Co-Editor协同编辑原型系统实现证明策略的有效性和正确性.