ABSTRACT
The actor model has been widely adopted in building stateful middle-tiers for large-scale interactive applications, where ACID transactions are useful to ensure application correctness. In this paper, we present Snapper, a new transaction library on top of Orleans, a popular actor system. Snapper exploits the characteristics of actor-oriented programming to improve the performance of multi-actor transactions by employing deterministic transaction execution, where pre-declared actor access information is used to generate deterministic execution schedules. The deterministic execution can potentially improve transaction throughput significantly, especially with a high contention level. Besides, Snapper can also execute actor transactions using conventional nondeterministic strategies, including S2PL, to account for scenarios where actor access information cannot be pre-declared. A salient feature of Snapper is the ability to execute concurrent hybrid workloads, where some transactions are executed deterministically while the others are executed nondeterministically. This novel hybrid execution is able to take advantage of the deterministic execution while being able to account for nondeterministic workloads. Our experimental results on two benchmarks show that deterministic execution can achieve up to 2x higher throughput than nondeterministic execution under a skewed workload. Additionally, the hybrid execution strategy can achieve a throughput that is close to deterministic execution when there is only a small percentage of nondeterministic transactions running in the system.
Supplemental Material
Available for Download
- Gul Agha. 1986. Actors: A Model of Concurrent Computation in Distributed Systems .MIT Press. https://doi.org/10.5555/7929Google ScholarCross Ref
- Akka. 2021 a. Akka Documentation. https://akka.io/. (July 2021).Google Scholar
- Akka. 2021 b. Migration Guide 2.3.x to 2.4.x. https://doc.akka.io/docs/akka/2.4/project/migration-guide-2.3.x-2.4.x.html. (July 2021).Google Scholar
- Akka. 2021 c. Transactors (Java). https://doc.akka.io/docs/akka/2.0.5/java/transactors.html. (July 2021).Google Scholar
- Mohammad Alomari, Michael Cahill, Alan Fekete, and Uwe Rohm. 2008. The Cost of Serializability on Platforms That Use Snapshot Isolation. In Proceedings of the 2008 IEEE 24th International Conference on Data Engineering. 576--585.Google ScholarDigital Library
- Anonym. 2021. Unpublished Manuscript. (Sep 2021).Google Scholar
- Manos Athanassoulis, Ryan Johnson, Anastasia Ailamaki, and Radu Stoica. 2009. Improving OLTP Concurrency through Early Lock Release. Technical Report. EPFL.Google Scholar
- AWS. 2021. Amazon Aurora Pricing. https://aws.amazon.com/rds/aurora/pricing/. (July 2021).Google Scholar
- Azure. 2021. Azure SQL Database pricing. https://azure.microsoft.com/en-us/pricing/details/azure-sql-database/single/. (July 2021).Google Scholar
- Philip A. Bernstein. 2019. Resurrecting Middle-Tier Distributed Transactions. Bulletin of the IEEE Computer Society Technical Committee on Data Engineering, Vol. 42, 2 (June 2019), 3--6.Google Scholar
- Philip A. Bernstein, Sebastian Burckhardt, Sergey Bykov, Natacha Crooks, Jose M. Faleiro, Garbriel Kliot, Alok Kumbhare, Muntasir Raihan Rahman, Vivek Shah, Adriana Szekeres, and Jorgen Thelin. 2017a. Geo-Distribution of Actor-Based Services. In Proceedings of the ACM on Programming Languages. 1--26.Google ScholarDigital Library
- Philip A. Bernstein, Sergey Bykov, Alan Geller, Gabriel Kliot, and Jorgen Thelin. 2014. Orleans: Distributed Virtual Actors for Programmability and Scalability. Technical Report. Microsoft Research.Google Scholar
- Philip A. Bernstein, Mohammad Dashti, Tim Kiefer, and David Maier. 2017b. Indexing in an Actor-Oriented Database. In Conference on Innovative Database Research (CIDR) .Google Scholar
- Philip A. Bernstein, Vassco Hadzilacos, and Nathan Goodman. 1987. Concurrency control and recovery in database systems .Addison-Wesley Longman Publishing Co., Inc. https://doi.org/10.5555/12518Google ScholarDigital Library
- Philip A. Bernstein and Eric Newcomer. 1996. Principles of transaction processing: for the systems professional .Morgan Kaufmann Publishers Inc. https://doi.org/10.5555/261193Google ScholarDigital Library
- Sergey Bykov, Alan Geller, Gabriel Kliot, James R. Larus, Ravi Pandya, and Jorgen Thelin. 2011. Orleans: Cloud Computing for Everyone. In Proceedings of the 2nd ACM Symposium on Cloud Computing. 1--14.Google ScholarDigital Library
- Akka case study. 2021. Walmart Boosts Conversions By 20% With Lightbend Reactive Platform. https://www.lightbend.com/case-studies/walmart-boosts-conversions-by-20-with-lightbend-reactive-platform. (July 2021).Google Scholar
- Natacha Crooks, Matthew Burke, and Ethan Cecchetti. 2018. Obladi: Oblivious Serializable Transactions in the Cloud. In Proceedings of the 13th USENIX conference on Operating Systems Design and Implementation. 727--743.Google Scholar
- Carlo Curino, Evan Philip Charles Jones, Yang Zhang, and Samuel R Madden. 2010. Schism: a workload-driven approach to database replication and partitioning. (2010).Google Scholar
- dbyrne. 2015. Looking for alternatives of transactor. https://stackoverflow.com/questions/29154913/scala-replacement-for-akka-transactors. (March 2015).Google Scholar
- Bailu Ding, Lucja Kot, and Johannes Gehrke. 2018. Improving Optimistic Concurrency Control Through Transaction Batching and Operation Reordering. In Proceedings of the VLDB Endowment. 169--182.Google ScholarDigital Library
- Zhi-Yuan Dong, Chu-Zhe Tang, Jia-Chen Wang, Zhao-Guo Wang, Hai-Bo Chen, and Bin-Yu Zang. 2020. Optimistic Transaction Processing in Deterministic Database. Journal of Computer Science and Technology, Vol. 35, 2 (March 2020), 382--394.Google ScholarCross Ref
- Tamer Eldeeb and Philip A. Bernstein. 2016. Transactions for Distributed Actors in the Cloud. Technical Report. Microsoft Research.Google Scholar
- Elixir. 2021. Elixir Documentation. https://elixir-lang.org/. (July 2021).Google Scholar
- Erlang. 2021 a. Erlang Documentation. https://www.erlang.org/. (July 2021).Google Scholar
- Erlang. 2021 b. Who uses Erlang for product development? http://erlang.org/faq/introduction.html. (July 2021).Google Scholar
- Jose M. Faleiro, Daniel J. Abadi, and Joseph M. Hellerstein. 2017. High Performance Transactions via Early Write Visibility. In Proceedings of the VLDB Endowment. 613--624.Google Scholar
- Shady Issa, Miguel Viegas, Pedro Raminhas, Nuno Machado, Miguel Matos, and Paolo Romano. 2020. Exploiting Symbolic Execution to Accelerate Deterministic Databases. In 2020 IEEE 40th International Conference on Distributed Computing Systems (ICDCS). 678--688.Google ScholarCross Ref
- Butler Lampson and Howard E. Sturgis. 1979. Crash Recovery in a Distributed Data Storage System. Technical Report. Microsoft Research.Google Scholar
- Barbara Liskov and Liuba Shrira. 1988. Promises: Linguistic Support for Efficient Asynchronous Procedure Calls in Distributed Systems. In Proceedings of the ACM SIGPLAN'88 Conference on Programming Language Design and Implementation (PLDI). 260--267.Google ScholarDigital Library
- Yi Lu, Xiangyao Yu, Lei Cao, and Samuel Madden. 2020. Aria: a fast and practical deterministic OLTP database. In Proceedings of the VLDB Endowment. 2047--2060.Google ScholarDigital Library
- Yi Lu, Xiangyao Yu, Lei Cao, and Samuel Madden. 2021. Epoch-based Commit and Replication in Distributed OLTP Databases. In Proceedings of the VLDB Endowment. 743--756.Google ScholarDigital Library
- mathdotnet. 2021. Zipf. https://numerics.mathdotnet.com/api/MathNet.Numerics.Distributions/Zipf.htm. (July 2021).Google Scholar
- C. Mohan and B. Lindsay. 1985. Efficient commit protocols for the tree of processes model of distributed transactions. ACM SIGOPS Operating Systems Review, Vol. 19, 2 (April 1985), 40--52.Google ScholarDigital Library
- Shuai Mu, Yang Cui, Yang Zhang, Wyatt Lloyd, and Jinyang Li. 2014. Extracting More Concurrency from Distributed Transactions. In Proceedings of the 11th USENIX conference on Operating Systems Design and Implementation. 479--494.Google ScholarDigital Library
- Orbit. 2021. Orbit Documentation. https://www.orbit.cloud/orbit/. (July 2021).Google Scholar
- Orleans. 2021 a. Orleans Documentation. https://dotnet.github.io/orleans/docs/index.html. (July 2021).Google Scholar
- Orleans. 2021 b. Orleans Transactions. https://dotnet.github.io/orleans/docs/grains/transactions.html. (July 2021).Google Scholar
- Andrew Pavlo, Carlo Curino, and Stanley Zdonik. 2012. Skew-aware automatic database partitioning in shared-nothing, parallel OLTP systems. In Proceedings of the 2012 ACM SIGMOD International Conference on Management of Data. 61--72.Google ScholarDigital Library
- Per Persson and Ola Angelsmark. 2015. Calvin--Merging Cloud and IoT. Procedia Computer Science, Vol. 52 (June 2015), 210--217.Google ScholarCross Ref
- Guna Prasaad, Alvin Cheung, and Dan Suciu. 2020. Handling Highly Contended OLTP Workloads Using Fast Dynamic Partitioning. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data. 527--542.Google ScholarDigital Library
- Michal Ptaszek. 2015. Chat Service Architecture: Servers. https://technology.riotgames.com/news/chat-service-architecture-servers. (September 2015).Google Scholar
- Kun Ren, Alexander Thomson, and Daniel J. Abadi. 2014. An Evaluation of the Advantages and Disadvantages of Deterministic Database Systems. In Proceedings of the VLDB Endowment. 821--832.Google Scholar
- Daniel J. Rosenkrantz, Richard E. Stearns, and Philip M. Lewis. 1978. System level concurrency control for distributed database systems. ACM Transactions on Database Systems, Vol. 3, 2 (June 1978), 178--198.Google ScholarDigital Library
- Vivek Shah and Marcos Antonio Vaz Salles. 2018. Reactors: A Case for Predictable, Virtualized Actor Database Systems. In Proceedings of the 2018 International Conference on Management of Data. 259--274.Google ScholarDigital Library
- Dennis Shasha, Francois Llirbat, Eric Simon, and Patrick Valduriez. 1995. Transaction chopping: algorithms and performance studies. ACM Transactions on Database Systems, Vol. 20, 3 (September 1995), 325--363.Google ScholarDigital Library
- Eljas Soisalon-Soininen and Tatu Ylönen. 1995. Partial Strictness in Two-Phase Locking. In Proceedings of the 5th International Conference on Database Theory. 139----147.Google ScholarDigital Library
- Hoop Somuah. 2014. Using Project "Orleans" in Halo. https://hoopsomuah.com/2014/04/06/using-project-orleans-in-halo/. (April 2014).Google Scholar
- Andrew S. Tanenbaum and Maarten van Steen. 2006. Distributed Systems: Principles and Paradigms (2nd Edition) .Prentice-Hall, Inc. https://doi.org/10.5555/1202502Google ScholarDigital Library
- @theotown. 2016. How Reactive systems help PayPal's squbs scale to billions of transactions daily. https://www.lightbend.com/blog/how-reactive-systems-help-paypal-squbs-scale-to-billions-of-transactions-daily. (June 2016).Google Scholar
- Alexander Thomson and Daniel J. Abadi. 2010. The case for determinism in database systems. In Proceedings of the VLDB Endowment. 70--80.Google Scholar
- Alexander Thomson, Thaddeus Diamond, Shu-Chun Weng, Kun Ren, Philip Shao, and Daniel J. Abadi. 2012. Calvin: Fast Distributed Transactions for Partitioned Database Systems. In Proceedings of the 2012 ACM SIGMOD International Conference on Management of Data. 1--12.Google Scholar
- TPCC. 2021. TPC-C is an On-Line Transaction Processing Benchmark. http://www.tpc.org/tpcc/. (July 2021).Google Scholar
- Akka user. 2021. Transactors and STM are gone. What conception to use instead? https://groups.google.com/g/akka-user/c/XS-Pk3SOzbw?pli=1. (July 2021).Google Scholar
- Zhaoguo Wang, Shuai Mu, Yang Cui, Han Yi, Haibo Chen, and Jinyang Li. 2016. Scaling Multicore Databases via Constrained Parallel Execution. In Proceedings of the 2016 International Conference on Management of Data. 1643--1658.Google ScholarDigital Library
- Chang Yao, Divyakant Agrawal, Gang Chen, Qian Lin, Beng Chin Ooi, Weng-Fai Wong, and Meihui Zhang. 2016. Exploiting Single-Threaded Model in Multi-Core In-Memory Systems. IEEE Transactions on Knowledge and Data Engineering, Vol. 28, 10 (October 2016), 2635--2650.Google ScholarDigital Library
- Yang Zhang, Russell Power, Siyuan Zhou, Yair Sovran, Marcos K. Aguilera, and Jinyang Li. 2013. Transaction chains: achieving serializability with low latency in geo-distributed storage systems. In Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles. 276--291.Google ScholarDigital Library
Index Terms
- Hybrid Deterministic and Nondeterministic Execution of Transactions in Actor Systems
Recommendations
Using Tickets to Enforce the Serializability of Multidatabase Transactions
To enforce global serializability in a multidatabase environment the multidatabase transaction manager must take into account the indirect (transitive) conflicts between multidatabase transactions caused by local transactions. Such conflicts are ...
Scalable Atomic Visibility with RAMP Transactions
Databases can provide scalability by partitioning data across several servers. However, multipartition, multioperation transactional access is often expensive, employing coordination-intensive locking, validation, or scheduling mechanisms. Accordingly, ...
Correct Execution of Transactions at Different Isolation Levels
Many transaction processing applications execute at isolation levels lower than SERIALIZABLE in order to increase throughput and reduce response time. However, the resulting schedules might not be serializable and, hence, not necessarily correct. The ...
Comments