Thread-safe reactive programming

Thread-safe reactive programming
复制标题

线程安全的反应式编程

DOI:
10.1145/3276477
复制
发表时间:
2018
影响因子:
--
通讯作者:
Mira Mezini
Mira Mezini
中科院分区:
--
文献类型:
--
作者:
Joscha Drechsler;Ragnar Mogk;Guido Salvaneschi;Mira Mezini

文献摘要

参考文献

被引文献

相似文献

用反应式语言编写的应用程序的执行涉及在明确定义的点上在命令式抽象和反应式抽象之间传输数据和控制流。在多线程环境中,可能会同时执行多个这样的交互,这可能会导致数据竞争和事件排序不明确。现有的RP语言要么禁用多线程,要么处理它,代价是降低了表现力或削弱了一致性。提出了一种线程安全的反应式编程模型,该模型在不牺牲可表现性和一致性的前提下,保证了并发条件下的无中止严格可串行化。我们还提出了一种将相应的调度器集成到RP语言运行时的体系结构,从而为应用程序提供了开箱即用的线程安全。通过提供和评估集成到REScala编程语言中的现成实现,我们展示了我们的建议的可行性。该调度算法被正式证明是正确的。一项全面的经验评估表明,反应式应用程序可以在其基础上构建多个线程,而调度器在单线程配置中会产生可接受的性能开销。我们的调度器实现的可伸缩性与手动创建的应用程序特定锁定大致相当,而优于使用现成软件事务内存库的调度器所实现的可伸缩性。
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.
用于反应式编程的容器和聚合、变异器和隔离
DOI: --
发表时间: 2014
期刊: SCALA@ECOOP
影响因子: --
作者:
Aleksandar Prokopec;Philipp Haller;Martin Odersky
通讯作者: Martin Odersky
DOI: --
发表时间: 2012
期刊: ACM-SIGPLAN Symposium on Programming Language Design and Implementation
影响因子: --
作者:
Aaron Turon
通讯作者: Aaron Turon
一种并行自调整计算的建议
DOI: --
发表时间: 2007
期刊: Workshop on Declarative Aspects of Multicore Programming
影响因子: --
作者:
Matthew A. Hammer;Umut A. Acar;M. Rajagopalan;Anwar M. Ghuloum
通讯作者: Anwar M. Ghuloum
DOI: 10.1145/2661136.2661140
发表时间: 2014
期刊: Proceedings of the 2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software
影响因子: --
作者:
Bob Reynders;Dominique Devriese;Frank Piessens
通讯作者: Frank Piessens
DOI: 10.22152/programming-journal.org/2017/1/12
发表时间: 2017-03
期刊: ArXiv
影响因子: --
作者:
Stefan Ramson;R. Hirschfeld
通讯作者: Stefan Ramson;R. Hirschfeld