skip to main content


Title: Reactors: A Deterministic Model for Composable Reactive Systems
NOTE: DOI IS available but the nsfpar system rejects it: 10.1007/978-3-030-41131-2_4 This paper describes a component-based concurrent model of computation for reactive systems. The components in this model, featuring ports and hierarchy, are called reactors. The model leverages a semantic notion of time, an event scheduler, and a synchronous-reactive style of communication to achieve determinism. Reactors enable a programming model that ensures determinism, unless explicitly abandoned by the programmer. We show how the coordination of reactors can safely and transparently exploit parallelism, both in shared-memory and distributed systems.  more » « less
Award ID(s):
1836601
NSF-PAR ID:
10188807
Author(s) / Creator(s):
; ; ; ; ; ;
Date Published:
Journal Name:
Model-Based Design of Cyber Physical Systems (CyPhy'19)
Format(s):
Medium: X
Sponsoring Org:
National Science Foundation
More Like this
  1. Many programming languages and programming frameworks focus on parallel and distributed computing. Several frameworks are based on actors, which provide a more disciplined model for concurrency than threads. The interactions between actors, however, if not constrained, admit nondeterminism. As a consequence, actor programs may exhibit unintended behaviors and are less amenable to rigorous testing. We show that nondeterminism can be handled in a number of ways, surveying dataflow dialects, process networks, synchronous-reactive models, and discrete-event models. These existing approaches, however, tend to require centralized control, pose challenges to modular system design, or introduce a single point of failure. We describe “reactors,” a new coordination model that combines ideas from several of these approaches to enable determinism while preserving much of the style of actors. Reactors promote modularity and allow for distributed execution. By using a logical model of time that can be associated with physical time, reactors also provide control over timing. Reactors also expose parallelism that can be exploited on multicore machines and in distributed configurations without compromising determinacy. 
    more » « less
  2. Actors have become widespread in programming languages and programming frameworks focused on parallel and distributed computing. While actors provide a more disciplined model for concurrency than threads, their interactions, if not constrained, admit nondeterminism. As a consequence, actor programs may exhibit unintended behaviors and are less amenable to rigorous testing. We show that nondeterminism can be handled in a number of ways, surveying dataflow dialects, process networks, synchronous-reactive models, and discrete-event models. These existing approaches, however, tend to require centralized control, pose challenges to modular system design, or introduce a single point of failure. We describe “reactors,” a new coordination model that combines ideas from several of the aforementioned approaches to enable determinism while preserving much of the style of actors. Reactors promote modularity and allow for distributed execution. By using a logical model of time that can be associated with physical time, reactors also admit control over timing. 
    more » « less
  3. Actor frameworks and similar reactive programming techniques are widely used for building concurrent systems. They promise to be efficient and scale well to a large number of cores or nodes in a distributed system. However, they also expose programmers to nondeterminism, which often makes implementations hard to understand, debug, and test. The recently proposed reactor model is a promising alternative that enables deterministic concurrency. In this article, we present an efficient, parallel implementation of reactors and demonstrate that the determinacy of reactors does not imply a loss in performance. To show this, we evaluateLingua Franca(LF), a reactor-oriented coordination language. LF equips mainstream programming languages with a deterministic concurrency model that automatically takes advantage of opportunities to exploit parallelism. Our implementation of the Savina benchmark suite demonstrates that, in terms of execution time, the runtime performance of LF programs even exceeds popular and highly optimized actor frameworks. We compare against Akka and CAF, which LF outperforms by 1.86× and 1.42×, respectively.

     
    more » « less
  4. The kinetics of model contaminant 4-chloronitrobenzene (4-ClNB) reduction by Fe( ii ) in aqueous suspensions containing either or both goethite (α-FeOOH) nanoparticles and kaolinite (Al 2 Si 2 O 5 (OH) 4 ) were quantified to elucidate the effects of nonreactive clay minerals on the attenuation of nitroaromatic groundwater contaminants by iron oxide nanoparticles. Increasing the amount of kaolinite in the presence of goethite decreased the reduction rate of 4-ClNB and competitive Fe( ii ) adsorption on kaolinite occurred. Cryogenic transmission and scanning electron microscopy (cryo-TEM and cryo-SEM) images did not reveal significant loss of accessible reactive surface area as a result of heteroaggregation. Sequential-spike batch reactors revealed that in the presence of kaolinite, 4-ClNB reduction rate decreased by more than a factor of three with extended reaction as a result of kaolinite dissolution and subsequent incorporation of Al and Si in goethite or on the goethite surface. The reactive sites residing on the {110} faces were comparatively more reactive in the presence of a large loading of kaolinite, resulting in shorter and wider goethite particles after reaction. These results elucidate the mechanisms by which nonreactive clays affect the reactions of Fe( ii )/iron oxides in groundwater systems and indicate that nonreactive clays are not passive components. 
    more » « less
  5. We discuss a novel approach for constructing deterministic reactive systems that evolves around a temporal model which incorporates a multiplicity of timelines. This model is central to LINGUA FRANCA (LF), a polyglot coordination language and compiler toolchain we are developing for the definition and composition of concurrent components called Reactors, which are objects that react to and emit discrete events. What sets LF apart from other languages that treat time as a first-class citizen is that it confronts the issue that in any reactive system there are at least two distinct timelines involved; a logical one and a physical one-and possibly multiple of each kind. LF provides a mechanism for relating events across timelines, and guarantees deterministic program behavior under quantifiable assumptions. 
    more » « less