Containers and aggregates, mutators and isolates for reactive programming

Containers and aggregates, mutators and isolates for reactive programming
复制标题

用于反应式编程的容器和聚合、变异器和隔离

DOI:
--
复制
发表时间:
2014
期刊:
SCALA@ECOOP
影响因子:
--
通讯作者:
Martin Odersky
Martin Odersky
中科院分区:
--
文献类型:
--
作者:
Aleksandar Prokopec;Philipp Haller;Martin Odersky

文献摘要

被引文献

相似文献

许多程序都有一个固有的反应性质,这是由它们的数据和外部事件之间的函数依赖关系强加的。传统上,这些依赖关系使用回调来处理。具有第一类反应值的反应式编程是一种旨在将回调逻辑编码在声明性语句中的范例。反应值简洁地定义了单个数据元素之间的依赖关系,但不能有效地表达更大数据集中的依赖关系。从本质上讲,在共享内存并发模型中嵌入反应值会使它们的语义复杂化,并且需要同步。本文提出了一个通用的反应式编程框架,扩展了一流的反应式值与惰性反应容器的概念,由几个具体的实现。我们的框架通过引入反应隔离来解决并发问题。我们展示的例子表明,我们的编程模型是有效的,方便使用。
Many programs have an inherently reactive nature imposed by the functional dependencies between their data and external events. Classically, these dependencies are dealt with using callbacks. Reactive programming with first-class reactive values is a paradigm that aims to encode callback logic in declarative statements. Reactive values concisely define dependencies between singular data elements, but cannot efficiently express dependencies in larger datasets. Orthogonally, embedding reactive values in a shared-memory concurrency model convolutes their semantics and requires synchronization. This paper presents a generic framework for reactive programming that extends first-class reactive values with the concept of lazy reactive containers, backed by several concrete implementations. Our framework addresses concurrency by introducing reactive isolates. We show examples that our programming model is efficient and convenient to use.