With distributed computing and mobile applications becoming ever more prevalent, synchronizing diverging replicas of the same data is a common problem. Reconciliation – bringing two replicas of the same data structure as close as possible without overriding local changes – is investigated in an algebraic model. Our approach is to consider two sequences of simple commands that describe the changes in the replicas compared to the original structure, and then determine the maximal subsequences of each that can be propagated to the other. The proposed command set is shown to be functionally complete, and an update detection algorithm is presented which produces a command sequence transforming the original data structure into the replica while traversing both simultaneously. Syntactical characterization is provided in terms of a rewriting system for semantically equivalent command sequences. Algebraic properties of sequence pairs that are applicable to the same data structure are investigated. Based on these results the reconciliation problem is shown to have a unique maximal solution. In addition, syntactical properties of the maximal solution allow for an efficient algorithm that produces it.
F. Baader and T. Nupkow. Term rewriting and All That. Cambridge Univ. Press, 1998.
S. Balasubramaniam and B. C. Pierce. What is a File Synchronizer? In Proceedings of the 4th Annual ACM/IEEE International Conference on Mobile Computing and Networking. New York, NY. ACM, 1998, pp. 98–108.
M. Beaudry. Finite Idempotent Grupoids and Regular Languages. Informatique Théorique et Applications, 32:127–140, 1998.
C. Berzan and N. Ramsey. Summer Scholars Technical Report. Tuftst University, Medford, MA, 2010. Available as http://thirld.com/files/summerscholars_techreport.pdf.
E. P. Csirmaz. Algebraic File Synchronization: Adequacy and Completeness. arXiv: 1601.01736.
J. N. Foster, M. B. Greenwald, C. Kirkegaard, B. C. Pierce and A. Schmitt. Exploiting Schemas in Data Synchronization. In G. Bierman and C. Koch (eds) Database Program- ming Languages. Springer Berlin Heidelberg, 2005, pp. 42–57.
A-M. Kermarrec, A. Rowstron, M. Shapiro and P. Druschel. The IceCube Approach to the Reconciliation of Divergent Replicas. In Proceedings of the Twentieth Annual ACM Sym-posium on Principles of Distributed Computing. New York, NY. ACM, 2001, pp. 210–218.
V. Martins, E. Pacitti and P. Valduriez. Distributed Semantic Reconciliation of Replicated Data. in Proc. of CDUR, Paris, France. CNAM, 2005, pp. 48–53.
A. Ng and C. Sun. Operational Transformation for Real-time Synchronization of Shared Workspace in Cloud Storage. In Proceedings of the 19th International Conference on Sup- porting Group Work (GROUP ’16). Association for Computing Machinery, New York, NY, ACM, 61–70, 2016.
B. C. Pierce and J. Vouillon. What’s in Unison? A Formal Specification and Reference Im- plementation of a File Synchronizer. U. of Pennsylvania Technical Reports (CIS) 40, 2004. Available as http://repository.upenn.edu/cis_reports/40.
N. Ramsey and E. Csirmaz. An Algebraic Approach to File Synchronization. In Proceedings of the Joint 8th European Software Engineering Conference and 9th ACM SIGSOFT Symposium on the Foundations of Software Engineering. New York, NY. ACM, 2001, pp. 175–185.
Y. Saito and M. Shapiro. Optimistic Replication. In ACM Computing Surveys 2005, vol. 37, no. 1. pp. 42–81.
M. Shapiro, N. Preguiça, C. Baquero and M. Zawirski. Confiict-Free Replicated Data Types. In: X. Défago, F. Petit, V. Villain (eds) Stabilization, Safety, and Security of Distributed Systems. Lecture Notes in Computer Science, vol 6976. Springer, 2011, pp. 386–400.
C. Sun and C. Ellis. (1998, November). Operational Transformation in Real-time Group Editors: Issues, Algorithms, and Achievements. In Proceedings of the 1998 ACM conference on Computer supported cooperative work. pp. 59–68.
V. Tao and M. Shapiro and V. Rancurel. Merging Semantics for Confiict Updates in Geo- distributed File Systems. In Proceedings of the 8th ACM International Systems and Storage Conference. New York, NY. ACM, 2015, pp. 10:1–10:12.
D. B. Terry et al. Managing Update Confiicts in Bayou, a Weakly Connected Replicated Storage System. In Proceedings of the Fifteenth ACM Symposium on Operating Systems Prin- ciples. New York, NY. ACM, 1995, pp. 172–182.