Skip to main content

2PC+: A High Performance Protocol for Distributed Transactions of Micro-service Architecture

  • Chapter
  • First Online:
Intelligent Mobile Service Computing

Part of the book series: EAI/Springer Innovations in Communication and Computing ((EAISICC))

Abstract

Distributed storage systems run transactions across machines to ensure serializability in single-service architecture. Traditional protocols for distributed transactions are based on two-phase commit (2PC) or multi-version concurrency control (MVCC). 2PC serializes transactions as soon as they conflict and MVCC resorts to aborts, leaving many opportunities for con-currency on the distributed storage system. In the micro-service architecture, service nodes are deployed in heterogeneous distributed systems. 2PC and MVCC are struggling to break through the performance limitations of their existence. This paper presents 2PC+, a novel concurrency control protocol for distributed transactions that outperforms 2PC allowing more concurrency in micro-service architecture. 2PC+ is based on the traditional 2PC and MVCC, combined with transaction thread synchronization blocking optimization algorithm SAOLA. Then, we verify the algorithm SAOLA using the temporal logic of action TLA+ language. Finally, we compare 2PC+ to 2PC applying a case of Ctrip MSECP. When concurrent threads of the service call reach a certain threshold, 2PC+’s RT performance is improved by 2.87 times to 3.77 times compared with 2PC, and 2PC+’s TPS performance is 323.7% to 514.4% higher than 2PC.

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

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 54.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. B. Familiar, Microservice architecture [J] (2015)

    Google Scholar 

  2. F. Rademacher, S. Sachweh, A. Zündorf, Analysis of service-oriented modeling approaches for viewpoint- specific model-driven development of microservice architecture [J] (2018)

    Google Scholar 

  3. B.W. Lampson, D.B.A Lomet, New presumed commit optimization for two phase commit [C]. in International Conference on Very Large Data Bases (1993)

    Google Scholar 

  4. Qi Z, Xiao X, Zhang B, et al. Integrating X/Open DTP into Grid services for Grid transaction processing [C]. in IEEE International Workshop on Future Trends of Distributed Computing Systems (2004)

    Google Scholar 

  5. D. Peng, F. Dabek, Large-scale incremental processing using distributed transactions and notifications. in Operating Systems Design and Implementation (Oct. 2010)

    Google Scholar 

  6. A Dey, A Fekete, R Nambiar, et al., YCSB+T: Benchmarking web-scale transactional databases [C]. in IEEE International Conference on Data Engineering Workshops (2014)

    Google Scholar 

  7. S.J. Mullender, A.S. Tanenbaum, A distributed file service based on optimistic concurrency control [M]. ACM SIGOPS Operating Systems Review (2017), pp. 51–62

    Google Scholar 

  8. T. Neumann, T. Mühlbauer, A. Kemper, Fast serializable multi-version concurrency control for main-memory database systems [C].in ACM Sigmod International Conference on Management of Data (2015)

    Google Scholar 

  9. P. Bailis, A. Davidson, A. Fekete, et al., Highly available transactions: Virtues and limitations (extended version) [J]. Proc. Vldb Endowment 7(3), 181–192 (2013)

    Article  Google Scholar 

  10. S Mu, Y Cui, Y Zhang, et al., Extracting more concurrency from distributed transactions [C]. in Usenix Conference on Operating Systems Design & Implementation (USENIX Association, 2014)

    Google Scholar 

  11. R. Guerraoui, J Wang, How fast can a distributed transaction commit [C]. in The 36th ACM SIGMOD-SIGACT-SIGAI Symposium (ACM, 2017)

    Google Scholar 

  12. J.C. Corbett, J. Dean, M. Epstein, Spanner: Google’s globally-distributed database [C]. in Proceedings of OSDI (2012)

    Google Scholar 

  13. OceanBase. https://oceanbase.alipay.com/

  14. TiDB. https://pingcap.com/

  15. D. Bernstein, Today’s Tidbit: VoltDB [J]. IEEE Cloud Comput. 1(1), 90–92 (2014)

    Article  Google Scholar 

Download references

Acknowledgment

Our deepest gratitude goes to the anonymous reviewers for their valuable suggestions to improve this paper. This paper is partially supported by funding under National Key Research and Development Project 2017YFB1001800, NSFC Project 61972150, and Shanghai Knowledge Service Platform Project ZF1213.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jing Liu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Fan, P., Liu, J., Yin, W., Wang, H., Chen, X., Sun, H. (2021). 2PC+: A High Performance Protocol for Distributed Transactions of Micro-service Architecture. In: Gao, H., Yin, Y. (eds) Intelligent Mobile Service Computing. EAI/Springer Innovations in Communication and Computing. Springer, Cham. https://doi.org/10.1007/978-3-030-50184-6_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-50184-6_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-50183-9

  • Online ISBN: 978-3-030-50184-6

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics