Conflict-Free Replicated Data Types

  • Marc Shapiro
  • Nuno Preguiça
  • Carlos Baquero
  • Marek Zawirski
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6976)

Abstract

Replicating data under Eventual Consistency (EC) allows any replica to accept updates without remote synchronisation. This ensures performance and scalability in large-scale distributed systems (e.g., clouds). However, published EC approaches are ad-hoc and error-prone. Under a formal Strong Eventual Consistency (SEC) model, we study sufficient conditions for convergence. A data type that satisfies these conditions is called a Conflict-free Replicated Data Type (CRDT). Replicas of any CRDT are guaranteed to converge in a self-stabilising manner, despite any number of failures. This paper formalises two popular approaches (state- and operation-based) and their relevant sufficient conditions. We study a number of useful CRDTs, such as sets with clean semantics, supporting both add and remove operations, and consider in depth the more complex Graph data type. CRDT types can be composed to develop large-scale distributed applications, and have interesting theoretical properties.

Keywords

Eventual Consistency Replicated Shared Objects Large-Scale Distributed Systems 

References

  1. 1.
    Baquero, C., Moura, F.: Specification of convergent abstract data types for autonomous mobile computing. Tech. rep., Departamento de Informática, Universidade do Minho (October 1997)Google Scholar
  2. 2.
    Burckhardt, S., Leijen, D.: Semantics of concurrent revisions. In: Barthe, G. (ed.) ESOP 2011. LNCS, vol. 6602, pp. 116–135. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  3. 3.
    DeCandia, G., Hastorun, D., Jampani, M., Kakulapati, G., Lakshman, A., Pilchin, A., Sivasubramanian, S., Vosshall, P., Vogels, W.: Dynamo: Amazon’s highly available key-value store. In: Symp. on Op. Sys. Principles (SOSP). Operating Systems Review, vol. 41, pp. 205–220 (October 2007)Google Scholar
  4. 4.
    Delaët, S., Ducourthial, B., Tixeuil, S.: Self-stabilization with R-operators revisited. In: Tixeuil, S., Herman, T. (eds.) SSS 2005. LNCS, vol. 3764, pp. 68–80. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  5. 5.
    Demers, A.J., Greene, D.H., Hauser, C., Irish, W., Larson, J.: Epidemic algorithms for replicated database maintenance. In: Symp. on Principles of Dist. Comp. (PODC), pp. 1–12 (August 1987); also appears Op. Sys. Review 22(1), 8–32 (1988)Google Scholar
  6. 6.
    Ducourthial, B.: R-semi-groups: a generic approach for designing stabilizing silent tasks. In: Masuzawa, T., Tixeuil, S. (eds.) SSS 2007. LNCS, vol. 4838, pp. 281–295. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Ellis, C.A., Gibbs, S.J.: Concurrency control in groupware systems. In: Int. Conf. on the Mgt. of Data (SIGMOD), pp. 399–407 (1989)Google Scholar
  8. 8.
    Gilbert, S., Lynch, N.: Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. SIGACT News 33(2), 51–59 (2002)CrossRefGoogle Scholar
  9. 9.
    Johnson, P.R., Thomas, R.H.: The maintenance of duplicate databases. Internet Request for Comments RFC 677, Information Sciences Institute (January 1976)Google Scholar
  10. 10.
    Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Communications of the ACM 21(7), 558–565 (1978)CrossRefMATHGoogle Scholar
  11. 11.
    Mattern, F.: Virtual time and global states of distributed systems. In: Int. W. on Parallel and Distributed Algorithms, pp. 215–226 (1989)Google Scholar
  12. 12.
    Oster, G., Urso, P., Molli, P., Imine, A.: Proving correctness of transformation functions in collaborative editing systems. Rapport de recherche RR-5795, LORIA – INRIA Lorraine (December 2005)Google Scholar
  13. 13.
    Petersen, K., Spreitzer, M.J., Terry, D.B., Theimer, M.M., Demers, A.J.: Flexible update propagation for weakly consistent replication. In: Symp. on Op. Sys. Principles (SOSP), pp. 288–301 (October 1997)Google Scholar
  14. 14.
    Preguiça, N., Marquès, J.M., Shapiro, M., Leţia, M.: A commutative replicated data type for cooperative editing. In: Int. Conf. on Distributed Comp. Sys (ICDCS), pp. 395–403 (June 2009)Google Scholar
  15. 15.
    Preguiça, N., Shapiro, M., Matheson, C.: Semantics-based reconciliation for collaborative and mobile environments. In: Chung, S., Schmidt, D.C. (eds.) CoopIS 2003, DOA 2003, and ODBASE 2003. LNCS, vol. 2888, pp. 38–55. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  16. 16.
    Roh, H.G., Jeon, M., Kim, J.S., Lee, J.: Replicated abstract data types: Building blocks for collaborative applications. Journal of Parallel and Dist. Comp., pp. 354–368 (March 2011)Google Scholar
  17. 17.
    Saito, Y., Shapiro, M.: Optimistic replication. ACM Comput. Surv. 37(1), 42–81 (2005)CrossRefMATHGoogle Scholar
  18. 18.
    Shapiro, M.: Preguiça, N., Baquero, C., Zawirski, M.: A comprehensive study of Convergent and Commutative Replicated Data Types. Rapport de recherche 7506, Institut Nat. de la Recherche en Informatique et Automatique (INRIA), Rocquencourt, France (January 2011)Google Scholar
  19. 19.
    Shapiro, M., Preguiça, N., Baquero, C., Zawirski, M.: Conflict-free Replicated Data Types. Rapport de recherche 7686, Institut Nat. de la Recherche en Informatique et Automatique (INRIA), Rocquencourt, France (July 2011)Google Scholar
  20. 20.
    Terry, D.B., Theimer, M.M., Petersen, K., Demers, A.J., Spreitzer, M.J., Hauser, C.H.: Managing update conflicts in Bayou, a weakly connected replicated storage system. In: 15th Symp. on Op. Sys. Principles (SOSP), pp. 172–182 (December 1995)Google Scholar
  21. 21.
    Vogels, W.: Eventually consistent. ACM Queue 6(6), 14–19 (2008)CrossRefGoogle Scholar
  22. 22.
    Weiss, S., Urso, P., Molli, P.: Logoot-undo: Distributed collaborative editing system on P2P networks. IEEE Trans. on Parallel and Dist. Sys (TPDS) 21, 1162–1174 (2010)CrossRefGoogle Scholar
  23. 23.
    Wuu, G.T.J., Bernstein, A.J.: Efficient solutions to the replicated log and dictionary problems. In: Symp. on Principles of Dist. Comp. (PODC), pp. 233–242 (August 1984)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Marc Shapiro
    • 1
    • 5
  • Nuno Preguiça
    • 1
    • 2
  • Carlos Baquero
    • 3
  • Marek Zawirski
    • 1
    • 4
  1. 1.INRIAParisFrance
  2. 2.CITIUniversidade Nova de LisboaPortugal
  3. 3.Universidade do MinhoPortugal
  4. 4.UPMCParisFrance
  5. 5.LIP6ParisFrance

Personalised recommendations