Abstract
Many transactions in web applications are constructed ad hoc in the application code. For example, developers might explicitly use locking primitives or validation procedures to coordinate critical code fragments. We refer to database operations coordinated by application code as ad hoc transactions. Until now, little is known about them. This paper presents the first comprehensive study on ad hoc transactions. By studying 91 ad hoc transactions among 8 popular open-source web applications, we find that (i) every studied application uses ad hoc transactions (up to 16 per application), 71 of which play critical roles; (ii) compared with database transactions, concurrency control of ad hoc transactions is much more flexible; (iii) ad hoc transactions are error-prone-53 of them have correctness issues, and 33 of them are confirmed by developers; and (iv) ad hoc transactions have the potential to improve performance in contentious workloads by utilizing application semantics such as access patterns. Finally, implications of ad hoc transactions to the database research community are discussed.
- P. Bailis, A. Fekete, M. J. Franklin, A. Ghodsi, J. M. Hellerstein, and I. Stoica. Feral concurrency control: An empirical investigation of modern application integrity. In SIGMOD '15.Google Scholar
- P. Bailis, A. Fekete, M. J. Franklin, A. Ghodsi, J. M. Hellerstein, and I. Stoica. Coordination avoidance in database systems. Proc. VLDB Endow., 8(3):185--196, Nov. 2014.Google ScholarDigital Library
- M. Dashti, S. Basil John, A. Shaikhha, and C. Koch. Transaction repair for multi-version concurrency control. In SIGMOD '17.Google Scholar
- Z. Dong, C. Tang, J. Wang, Z. Wang, H. Chen, and B. Zang. Optimistic transaction processing in deterministic database. Journal of Computer Science and Technology, 35(2):382--394, Mar. 2020.Google ScholarDigital Library
- K. P. Eswaran, J. N. Gray, R. A. Lorie, and I. L. Traiger. The notions of consistency and predicate locks in a database system. Commun. ACM, 19(11):624--633, Nov. 1976.Google ScholarDigital Library
- H. Garcia-Molina and K. Salem. Sagas. SIGMOD Rec., 16(3):249--259, Dec. 1987.Google ScholarDigital Library
- J. R. Jordan, J. Banerjee, and R. B. Batman. Precision locks. In SIGMOD '81.Google Scholar
- H. T. Kung and J. T. Robinson. On optimistic methods for concurrency control. ACM Trans. Database Syst., 6(2):213--226, June 1981.Google ScholarDigital Library
- C. Li, J. Leitao, A. Clement, N. M. Pregui¸ca, R. Rodrigues, and V. Vafeiadis. Automating the choice of consistency levels in replicated systems. In USENIX ATC '14.Google Scholar
- C. Li, D. Porto, A. Clement, J. Gehrke, N. Pregui¸ca, and R. Rodrigues. Making geo-replicated systems fast as possible, consistent when necessary. In OSDI '12.Google Scholar
- T. Neumann, T. M¨uhlbauer, and A. Kemper. Fast serializable multi-version concurrency control for main-memory database systems. In SIGMOD '15.Google Scholar
- C. Pu, G. E. Kaiser, and N. C. Hutchinson. Split-transactions for open-ended activities. In VLDB '88.Google Scholar
- C. Tang, Z. Wang, X. Zhang, Q. Yu, B. Zang, H. Guan, and H. Chen. Ad hoc transactions in web applications: The good, the bad, and the ugly. In SIGMOD '22.Google Scholar
- S. Tu, W. Zheng, E. Kohler, B. Liskov, and S. Madden. Speedy transactions in multicore in-memory databases. In SOSP '13.Google Scholar
- T. Warszawski and P. Bailis. ACIDRain: Concurrency-related attacks on database-backed web applications. In SIGMOD '17.Google Scholar
- Y. Wu, C.-Y. Chan, and K.-L. Tan. Transaction healing: Scaling optimistic concurrency control on multicores. In SIGMOD '16.Google Scholar
- W. Xiong, S. Park, J. Zhang, Y. Zhou, and Z. Ma. Ad hoc synchronization considered harmful. In OSDI '10.Google Scholar
Recommendations
Ad Hoc Transactions in Web Applications: The Good, the Bad, and the Ugly
SIGMOD '22: Proceedings of the 2022 International Conference on Management of DataMany transactions in web applications are constructed ad hoc in the application code. For example, developers might explicitly use locking primitives or validation procedures to coordinate critical code fragments. We refer to database operations ...
Ad Hoc Transactions through the Looking Glass: An Empirical Study of Application-Level Transactions in Web Applications
Many transactions in web applications are constructed ad hoc in the application code. For example, developers might explicitly use locking primitives or validation procedures to coordinate critical code fragments. We refer to database operations ...
Comments