Ad Hoc Transactions in Web Applications: The Good, the Bad, and the Ugly
Chuzhe Tang, Zhaoguo Wang, Xiaodong Zhang, Qianmian Yu, Binyu Zang, Haibing Guan, Haibo Chen
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. Based on the findings, we discuss the implications of ad hoc transactions to the database research community.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 6d17e5a6-e5fe-4f93-bb56-8b339bf2e0ceCited by top-tier papers12
- Detecting Isolation Bugs via Transaction Oracle ConstructionWensheng Dou, Ziyu Cui, Qianwang Dai, Jiansen Song et al.ICSE 2023 · 21 citations
- Epoxy: ACID Transactions Across Diverse Data StoresPeter Kraft, Qian Li, Xinjing Zhou, Peter Bailis et al.VLDB 2023 · 17 citations
- Mammoths Are Slow: The Overlooked Transactions of Graph DataAudrey Cheng, Jack Waudby, Hugo Firth, Natacha Crooks et al.VLDB 2024 · 9 citations
- Database Deadlock Diagnosis for Large-Scale ORM-Based Web ApplicationsZhiyuan Dong, Zhaoguo Wang, Chuanwei Yi, Xian Xu et al.ICDE 2023 · 7 citations
- Are Database System Researchers Making Correct Assumptions about Transaction Workloads?Cuong D. T. Nguyen, Kevin Chen, Christopher DeCarolis, Daniel J. AbadiSIGMOD 2025 · 4 citations
Builds on1
Related papers
- Understanding Transaction Bugs in Database SystemsZiyu Cui, Wensheng Dou, Yu Gao, Dong Wang et al.ICSE 2024 · 9 citations
- Protecting Data Integrity of Web Applications with Database Constraints Inferred from Application CodeHaochen Huang, Bingyu Shen, Li Zhong, Yuanyuan ZhouASPLOS 2023 · 16 citations
- Repairing serializability bugs in distributed database programs via automated schema refactoringKia Rahmani, Kartik Nagar, Benjamin Delaware, Suresh JagannathanPLDI 2021 · 4 citations
- Polaris: Enabling Transaction Priority in Optimistic Concurrency ControlChenhao Ye, Wuh-Chwen Hwang, Keren Chen, Xiangyao YuSIGMOD 2023 · 12 citations
- GeoTP: Latency-Aware Geo-Distributed Transaction Processing in Database MiddlewaresQiyu Zhuang, Xinyue Shi, Shuang Liu, Wei Lu et al.ICDE 2025 · 2 citations
