Thread-safe reactive programming

Author:

Drechsler Joscha1,Mogk Ragnar1,Salvaneschi Guido1,Mezini Mira1

Affiliation:

1. TU Darmstadt, Germany

Abstract

The execution of an application written in a reactive language involves transfer of data and control flow between imperative and reactive abstractions at well-defined points. In a multi-threaded environment, multiple such interactions may execute concurrently, potentially causing data races and event ordering ambiguities. Existing RP languages either disable multi-threading or handle it at the cost of reducing expressiveness or weakening consistency. This paper proposes a model for thread-safe reactive programming (RP) that ensures abort-free strict serializability under concurrency while sacrificing neither expressiveness nor consistency. We also propose an architecture for integrating a corresponding scheduler into the RP language runtime, such that thread-safety is provided "out-of-the-box" to the applications. We show the feasibility of our proposal by providing and evaluating a ready-to-use implementation integrated into the REScala programming language. The scheduling algorithm is formally proven correct. A thorough empirical evaluation shows that reactive applications build on top of it scale with multiple threads, while the scheduler incurs acceptable performance overhead in a single-threaded configuration. The scalability enabled by our scheduler is roughly on-par with that of hand-crafted application-specific locking and better than the scalability enabled by a scheduler using an off-the-shelf software transactional memory library.

Funder

European Research Council

Deutsche Forschungsgemeinschaft

Hessisches Ministerium für Wissenschaft und Kunst

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference45 articles.

1. Reactive Concurrent Programming Revisited

2. Engineer Bainomugisha Andoni Lombide Carreton Tom van Cutsem Stijn Mostinckx and Wolfgang de Meuter. 2013. A survey on reactive programming. ACM Comput. Surv. 45 4 Article 52 (2013) 34 pages. 10.1145/2501654.2501666 Engineer Bainomugisha Andoni Lombide Carreton Tom van Cutsem Stijn Mostinckx and Wolfgang de Meuter. 2013. A survey on reactive programming. ACM Comput. Surv. 45 4 Article 52 (2013) 34 pages. 10.1145/2501654.2501666

3. A critique of ANSI SQL isolation levels

4. Philip A Bernstein Vassos Hadzilacos and Nathan Goodman. 1986. Concurrency Control and Recovery in Database Systems. Addison-Wesley Longman Publishing Co. Inc. Boston MA USA. Philip A Bernstein Vassos Hadzilacos and Nathan Goodman. 1986. Concurrency Control and Recovery in Database Systems. Addison-Wesley Longman Publishing Co. Inc. Boston MA USA.

Cited by 12 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. LoRe: A Programming Model for Verifiably Safe Local-first Software;ACM Transactions on Programming Languages and Systems;2024-01-15

2. Bridging Between Active Objects: Multitier Programming for Distributed, Concurrent Systems;Lecture Notes in Computer Science;2024

3. Historiographer: Strongly-Consistent Distributed Reactive Programming with Minimal Locking;Companion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity;2023-10-22

4. Implementation of Thread Local Storage Optimization Method Based on LoongArch;2023 42nd Chinese Control Conference (CCC);2023-07-24

5. Reactive Programming on the Bare Metal: A Formal Model for a Low-Level Reactive Virtual Machine;Proceedings of the 9th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems;2022-11-29

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3