{"title":"特设事务:它们是什么以及为什么我们应该关心","authors":"Chuzhe Tang, Zhaoguo Wang, Xiaodong Zhang, Qianmian Yu, B. Zang, Hai-bing Guan, Haibo Chen","doi":"10.1145/3604437.3604440","DOIUrl":null,"url":null,"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.","PeriodicalId":346332,"journal":{"name":"ACM SIGMOD Record","volume":"21 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-06-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Ad Hoc Transactions: What They Are and Why We Should Care\",\"authors\":\"Chuzhe Tang, Zhaoguo Wang, Xiaodong Zhang, Qianmian Yu, B. Zang, Hai-bing Guan, Haibo Chen\",\"doi\":\"10.1145/3604437.3604440\",\"DOIUrl\":null,\"url\":null,\"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.\",\"PeriodicalId\":346332,\"journal\":{\"name\":\"ACM SIGMOD Record\",\"volume\":\"21 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-06-07\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"ACM SIGMOD Record\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3604437.3604440\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM SIGMOD Record","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3604437.3604440","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
摘要
web应用程序中的许多事务都是在应用程序代码中特别构造的。例如,开发人员可能显式地使用锁定原语或验证过程来协调关键的代码片段。我们将由应用程序代码协调的数据库操作称为临时事务。到目前为止,人们对它们知之甚少。本文首次对临时交易进行了全面研究。通过研究8个流行的开源web应用程序中的91个临时事务,我们发现(i)每个研究的应用程序都使用临时事务(每个应用程序多达16个),其中71个起关键作用;(ii)与数据库事务相比,临时事务的并发控制要灵活得多;(iii) AD hoc交易容易出错——其中53个有正确性问题,其中33个被开发人员确认;(iv)通过利用诸如访问模式之类的应用程序语义,特设事务有可能在有争议的工作负载中提高性能。最后,讨论了特设事务对数据库研究界的影响。
Ad Hoc Transactions: What They Are and Why We Should Care
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.