开放事务性操作:与STM Haskell中的非事务性资源交互

J. Conceição, A. R. D. Bois, Samuel da Silva Feitosa, G. H. Cavalheiro, R. Ribeiro
{"title":"开放事务性操作:与STM Haskell中的非事务性资源交互","authors":"J. Conceição, A. R. D. Bois, Samuel da Silva Feitosa, G. H. Cavalheiro, R. Ribeiro","doi":"10.1145/3546189.3549924","DOIUrl":null,"url":null,"abstract":"This paper addresses the problem of accessing external resources from inside transactions in STM Haskell, and for that purpose introduces a new abstraction called Open Transactional Actions (OTAs) that provides a framework for wrapping non-transactional resources in a transactional layer. OTAs allow the programmer to access resources through IO actions, from inside transactions, and also to register commit and abort handlers: the former are used to make the accesses to resources visible to other transactions at commit time, and the latter to undo changes in the resource if the transaction has to roll back. OTAs, once started, are guaranteed to be executed completely before the hosting transaction can be aborted, guarantying that if a resource is accessed, its respective commit and abort actions will be properly registered. We believe that OTAs could be used by expert programmers to implement useful system libraries and also to give a transactional semantics to fast linearizable data structures, i.e., transactional boosting. As a proof of concept, we present examples that use OTAs to implement transactional file access and transactional boosted data types that are faster than pure STM Haskell in most cases.","PeriodicalId":118757,"journal":{"name":"Proceedings of the 15th ACM SIGPLAN International Haskell Symposium","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-09-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Open transactional actions: interacting with non-transactional resources in STM Haskell\",\"authors\":\"J. Conceição, A. R. D. Bois, Samuel da Silva Feitosa, G. H. Cavalheiro, R. Ribeiro\",\"doi\":\"10.1145/3546189.3549924\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This paper addresses the problem of accessing external resources from inside transactions in STM Haskell, and for that purpose introduces a new abstraction called Open Transactional Actions (OTAs) that provides a framework for wrapping non-transactional resources in a transactional layer. OTAs allow the programmer to access resources through IO actions, from inside transactions, and also to register commit and abort handlers: the former are used to make the accesses to resources visible to other transactions at commit time, and the latter to undo changes in the resource if the transaction has to roll back. OTAs, once started, are guaranteed to be executed completely before the hosting transaction can be aborted, guarantying that if a resource is accessed, its respective commit and abort actions will be properly registered. We believe that OTAs could be used by expert programmers to implement useful system libraries and also to give a transactional semantics to fast linearizable data structures, i.e., transactional boosting. As a proof of concept, we present examples that use OTAs to implement transactional file access and transactional boosted data types that are faster than pure STM Haskell in most cases.\",\"PeriodicalId\":118757,\"journal\":{\"name\":\"Proceedings of the 15th ACM SIGPLAN International Haskell Symposium\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-09-06\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 15th ACM SIGPLAN International Haskell Symposium\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3546189.3549924\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 15th ACM SIGPLAN International Haskell Symposium","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3546189.3549924","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

本文解决了在STM Haskell中从内部事务访问外部资源的问题,并为此引入了一个新的抽象,称为开放事务操作(Open Transactional Actions, ota),它提供了一个框架,用于将非事务资源包装在事务层中。ota允许程序员通过IO操作从事务内部访问资源,还允许注册提交和中止处理程序:前者用于在提交时使对资源的访问对其他事务可见,后者用于在事务必须回滚时撤销资源中的更改。ota一旦启动,就保证在托管事务被中止之前完全执行,从而保证如果访问资源,其各自的提交和中止操作将被正确注册。我们相信,专业程序员可以使用ota来实现有用的系统库,也可以为快速线性化的数据结构提供事务语义,即事务提升。作为概念证明,我们提供了一些使用ota实现事务性文件访问和事务性增强数据类型的示例,在大多数情况下,这些数据类型比纯STM Haskell更快。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Open transactional actions: interacting with non-transactional resources in STM Haskell
This paper addresses the problem of accessing external resources from inside transactions in STM Haskell, and for that purpose introduces a new abstraction called Open Transactional Actions (OTAs) that provides a framework for wrapping non-transactional resources in a transactional layer. OTAs allow the programmer to access resources through IO actions, from inside transactions, and also to register commit and abort handlers: the former are used to make the accesses to resources visible to other transactions at commit time, and the latter to undo changes in the resource if the transaction has to roll back. OTAs, once started, are guaranteed to be executed completely before the hosting transaction can be aborted, guarantying that if a resource is accessed, its respective commit and abort actions will be properly registered. We believe that OTAs could be used by expert programmers to implement useful system libraries and also to give a transactional semantics to fast linearizable data structures, i.e., transactional boosting. As a proof of concept, we present examples that use OTAs to implement transactional file access and transactional boosted data types that are faster than pure STM Haskell in most cases.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信