Synql: A CRDT-Based Approach for Replicated Relational Databases with Integrity Constraints

  • Conference paper
  • First Online:
Distributed Applications and Interoperable Systems (DAIS 2024)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14677))

  • 24 Accesses

Abstract

Many offline-first applications use an embedded relational database, such as SQLite, to manage their data. The replication of the database eases the addition of collaborative features to its applications. Most of the approaches for replicating a relational database require coordination at some extent. A few approaches propose a coordination-less replication to allow offline work. These approaches are limited in two ways: (i) They do not respect Strong Eventual Consistency that states that two replicas converge as soon as they integrate the same set of modifications; (ii) They fail to preserve the combined effect of operations’ intent in complex scenarios. We propose Synql, an approach based on Conflict-free Replicated Data Types (CRDTs) that addresses these two limitations. Synql relies on a replicated state defined by the composition of CRDT primitives. The state of the database is computed over the replicated state. The user modifications are compensated so that the computed state corresponds to what the users saw and changed.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (Germany)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 77.03
Price includes VAT (Germany)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 58.84
Price includes VAT (Germany)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Almeida, P.S., Shoker, A., Baquero, C.: Delta state replicated data types. J. Parallel Distrib. Comput. 111, 162–173 (2018). https://doi.org/10.1016/j.jpdc.2017.08.003

    Article  Google Scholar 

  2. Bailis, P., Fekete, A., Franklin, M.J., Ghodsi, A., Hellerstein, J.M., Stoica, I.: Feral concurrency control: an empirical investigation of modern application integrity. In: Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data. SIGMOD 2015, Association for Computing Machinery, New York, NY, USA (2015). https://doi.org/10.1145/2723372.2737784

  3. Bailis, P., Fekete, A.D., Franklin, M.J., Ghodsi, A., Hellerstein, J.M., Stoica, I.: Coordination avoidance in database systems. Proceedings of the VLDB Endowment 8(3), 185–196 (2014). https://doi.org/10.14778/2735508.2735509

  4. Balegas, V., et al.: Putting consistency back into eventual consistency. In: Proceedings of the Tenth European Conference on Computer Systems, pp. 1–16. EuroSys 2015 (2015). https://doi.org/10.1145/2741948.2741972

  5. Balegas, V., Duarte, S., Ferreira, C., Rodrigues, R., Preguiça, N.M.: IPA: invariant-preserving applications for weakly consistent replicated databases. Proc. VLDB Endowment 12(4), 404–418 (2018). https://doi.org/10.14778/3297753.3297760

  6. Baquero, C., Almeida, P.S., Cunha, A., Ferreira, C.: Composition in state-based replicated data types. Bull. Eur. Assoc. Theor. Comput. Sci. 123 (2017). http://eatcs.org/beatcs/index.php/beatcs/article/view/507

  7. Brewer, E.A.: Towards robust distributed systems (abstract). In: Proceedings of the Nineteenth Annual ACM Symposium on Principles of Distributed Computing, PODC 2000 (2000). https://doi.org/10.1145/343477.343502

  8. Corbett, J.C., et al.: Spanner: Google’s globally distributed database. ACM Trans. Comput. Syst. 31(3) (2013). https://doi.org/10.1145/2491245

  9. DeCandia, G., et al.: Dynamo: Amazon’s highly available key-value store. In: Proceedings of Twenty-First ACM SIGOPS Symposium on Operating Systems Principles, SOSP 2007 (2007). https://doi.org/10.1145/1294261.1294281

  10. Fox, A., Brewer, E.: Harvest, yield, and scalable tolerant systems. In: Proceedings of the Seventh Workshop on Hot Topics in Operating Systems, pp. 174–178, March 1999. https://doi.org/10.1109/HOTOS.1999.798396

  11. Gilbert, S., Lynch, N.: Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. ACM SIGACT News 33(2), 51–59 (2002). https://doi.org/10.1145/564585.564601

    Article  Google Scholar 

  12. Johnson, P.R., Thomas, R.: Maintenance of duplicate databases, January 1975. https://doi.org/10.17487/RFC0677

  13. Kleppmann, M., Wiggins, A., van Hardenberg, P., McGranaghan, M.: Local-first software: you own your data, in spite of the cloud. In: Masuhara, H., Petricek, T. (eds.) Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software. Onward! 2019 (2019). https://doi.org/10.1145/3359591.3359737

  14. Kulkarni, S.S., Demirbas, M., Madappa, D., Avva, B., Leone, M.: Logical physical clocks. In: Proceedings of the 18th International Conference on Principles of Distributed Systems, OPODIS 2014 (2014). https://doi.org/10.1007/978-3-319-14472-6_2

  15. Lakshman, A., Malik, P.: Cassandra: A decentralized structured storage system. ACM SIGOPS Oper. Syst. Rev. 44(2), 35–40 (2010). https://doi.org/10.1145/1773912.1773922

  16. Li, C., Porto, D., Clement, A., Gehrke, J., Preguiça, N.M., Rodrigues, R.: Making geo-replicated systems fast as possible, consistent when necessary. In: Thekkath, C., Vahdat, A. (eds.) Proceedings of the 10th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2012 (2012). https://doi.org/10.5555/2387880.2387906

  17. Lopes, P., et al.: Antidote SQL: relaxed when possible, strict when necessary (2019). http://arxiv.org/abs/1902.03576

  18. Shapiro, M., Preguiça, N.M., Baquero, C., Zawirski, M.: Conflict-free replicated data types. In: Proceedings of the 13th International Symposium on Stabilization, Safety, and Security of Distributed Systems, SSS 2011 (2011). https://doi.org/10.1007/978-3-642-24550-3_29

  19. Stonebraker, M., Madden, S., Abadi, D.J., Harizopoulos, S., Hachem, N., Helland, P.: The end of an architectural era: (it’s time for a complete rewrite). In: Proceedings of the 33rd International Conference on Very Large Data Bases, VLDB 2007 (2007). https://doi.org/10.5555/1325851.1325981

  20. Sumbaly, R., Kreps, J., Gao, L., Feinberg, A., Soman, C., Shah, S.: Serving large-scale batch computed data with project voldemort. In: Proceedings of the 10th USENIX Conference on File and Storage Technologies, FAST 2012, USENIX Association (2012). https://doi.org/10.5555/2208461.2208479

  21. Thomson, A., Diamond, T., Weng, S.C., Ren, K., Shao, P., Abadi, D.J.: Calvin: fast distributed transactions for partitioned database systems. In: Proceedings of the 2012 ACM SIGMOD International Conference on Management of Data, SIGMOD 2012 (2012). https://doi.org/10.1145/2213836.2213838

  22. Tu, S., Zheng, W., Kohler, E., Liskov, B., Madden, S.: Speedy transactions in multicore in-memory databases. In: Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles, SOSP 2013 (2013). https://doi.org/10.1145/2517349.2522713

  23. Yu, W., Elvinger, V., Ignat, C.L.: A generic undo support for state-based CRDTS. In: Felber, P., Friedman, R., Gilbert, S., Miller, A. (eds.) Proceedings of the 23rd International Conference on Principles of Distributed Systems, OPODIS 2019 (2019). https://doi.org/10.4230/LIPIcs.OPODIS.2019.14

  24. Yu, W., Ignat, C.L.: Conflict-free replicated relations for multi-synchronous database management at edge. In: Proceedings of the IEEE International Conference on Smart Data Services, SMDS 2020 (2020). https://doi.org/10.1109/SMDS49396.2020.00021

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Claudia-Lavinia Ignat .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 IFIP International Federation for Information Processing

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ignat, CL., Elvinger, V., Ba, H. (2024). Synql: A CRDT-Based Approach for Replicated Relational Databases with Integrity Constraints. In: Martins, R., Selimi, M. (eds) Distributed Applications and Interoperable Systems. DAIS 2024. Lecture Notes in Computer Science, vol 14677. Springer, Cham. https://doi.org/10.1007/978-3-031-62638-8_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-62638-8_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-62637-1

  • Online ISBN: 978-3-031-62638-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation