2 research outputs found
Tackling the Awkward Squad for Reactive Programming: The Actor-Reactor Model
Reactive programming is a programming paradigm whereby programs are internally represented by a dependency graph, which is used to automatically (re)compute parts of a program whenever its input changes. In practice reactive programming can only be used for some parts of an application: a reactive program is usually embedded in an application that is still written in ordinary imperative languages such as JavaScript or Scala. In this paper we investigate this embedding and we distill "the awkward squad for reactive programming" as 3 concerns that are essential for real-world software development, but that do not fit within reactive programming. They are related to long lasting computations, side-effects, and the coordination between imperative and reactive code. To solve these issues we design a new programming model called the Actor-Reactor Model in which programs are split up in a number of actors and reactors. Actors and reactors enforce a strict separation of imperative and reactive code, and they can be composed via a number of composition operators that make use of data streams. We demonstrate the model via our own implementation in a language called Stella
ReactiFi: Reactive Programming of Wi-Fi Firmware on Mobile Devices
Network programmability will be required to handle future increased network
traffic and constantly changing application needs. However, there is currently
no way of using a high-level, easy to use programming language to program Wi-Fi
firmware. This impedes rapid prototyping and deployment of novel network
services/applications and hinders continuous performance optimization in Wi-Fi
networks, since expert knowledge is required for both the used hardware
platforms and the Wi-Fi domain. In this paper, we present ReactiFi, a
high-level reactive programming language to program Wi-Fi chips on mobile
consumer devices. ReactiFi enables programmers to implement extensions of PHY,
MAC, and IP layer mechanisms without requiring expert knowledge of Wi-Fi chips,
allowing for novel applications and network protocols. ReactiFi programs are
executed directly on the Wi-Fi chip, improving performance and power
consumption compared to execution on the main CPU. ReactiFi is conceptually
similar to functional reactive languages, but is dedicated to the
domain-specific needs of Wi-Fi firmware. First, it handles low-level
platform-specific details without interfering with the core functionality of
Wi-Fi chips. Second, it supports static reasoning about memory usage of
applications, which is important for typically memory-constrained Wi-Fi chips.
Third, it limits dynamic changes of dependencies between computations to
dynamic branching, in order to enable static reasoning about the order of
computations. We evaluate ReactiFi empirically in two real-world case studies.
Our results show that throughput, latency, and power consumption are
significantly improved when executing applications on the Wi-Fi chip rather
than in the operating system kernel or in user space. Moreover, we show that
the high-level programming abstractions of ReactiFi have no performance
overhead compared to manually written C code