9 research outputs found

    Fault-tolerant Distributed Reactive Programming

    Get PDF
    In this paper, we present a holistic approach to provide fault tolerance for distributed reactive programming. Our solution automatically stores and recovers program state to handle crashes, automatically updates and shares distributed parts of the state to provide eventual consistency, and handles errors in a fine-grained manner to allow precise manual control when necessary. By making use of the reactive programming paradigm, we provide these mechanisms without changing the behavior of existing programs and with reasonable performance, as indicated by our experimental evaluation

    Hajautetun reaktiivisen ohjelmoinnin haasteet

    Get PDF
    Tiivistelmä. Hajautetun arkkitehtuurin ja reaktiiviseen ohjelmointiin yhdistäminen luo monenlaisia haasteita sovelluksen toiminnan tason takaamiselle. Eri komponenttien pitää pystyä esittämään jaettua tilaa yhtäpitävästi ja tiedon kulkua niiden välillä pitää pystyä koordinoimaan. Reaktiivisen arvojen topologisen päivitysjärjestyksen skaalautuminen hajautettuihin ympäristöihin on rajallista. Virheiden todennäköisyys kasvaa, kun komponenttien pitää kommunikoida verkon yli. Verkkohäiriöt voivat katkaista tai hidastaa kommunikaatiokanavia. Yksittäisten komponenttien joutuessa vikatilaan, pitäisi muiden osata reagoida siihen. Tämä tutkielma selvitti minkälaisia haasteita liittyy hajautettuun reaktiiviseen ohjelmointiin. Se tehtiin kirjallisuuskatsauksena, jonka tulosten pohjalta nämä keskeiset haasteet luokiteltiin kuuteen aihealueeseen. Nämä ovat tiedon toisintaminen, tapahtumaohjautuvuus, topologinen päivitysjärjestys, virheet, verkkohäiriöt ja osittaiset häiriöt

    LoRe: A Programming Model for Verifiably Safe Local-First Software (Extended Abstract)

    Get PDF
    Local-first software manages and processes private data locally while still enabling collaboration between multiple parties connected via partially unreliable networks. Such software typically involves interactions with users and the execution environment (the outside world). The unpredictability of such interactions paired with their decentralized nature make reasoning about the correctness of local-first software a challenging endeavor. Yet, existing solutions to develop local-first software do not provide support for automated safety guarantees and instead expect developers to reason about concurrent interactions in an environment with unreliable network conditions. We propose LoRe, a programming model and compiler that automatically verifies developer-supplied safety properties for local-first applications. LoRe combines the declarative data flow of reactive programming with static analysis and verification techniques to precisely determine concurrent interactions that violate safety invariants and to selectively employ strong consistency through coordination where required. We propose a formalized proof principle and demonstrate how to automate the process in a prototype implementation that outputs verified executable code. Our evaluation shows that LoRe simplifies the development of safe local-first software when compared to state-of-the-art approaches and that verification times are acceptable

    Smart Street Lights and Mobile Citizen Apps for Resilient Communication in a Digital City

    Full text link
    Currently, nearly four billion people live in urban areas. Since this trend is increasing, natural disasters or terrorist attacks in such areas affect an increasing number of people. While information and communication technology is crucial for the operation of urban infrastructures and the well-being of its inhabitants, current technology is quite vulnerable to disruptions of various kinds. In future smart cities, a more resilient urban infrastructure is imperative to handle the increasing number of hazardous situations. We present a novel resilient communication approach based on smart street lights as part of the public infrastructure. It supports people in their everyday life and adapts its functionality to the challenges of emergency situations. Our approach relies on various environmental sensors and in-situ processing for automatic situation assessment, and a range of communication mechanisms (e.g., public WiFi hotspot functionality and mesh networking) for maintaining a communication network. Furthermore, resilience is not only achieved based on infrastructure deployed by a digital city's municipality, but also based on integrating citizens through software that runs on their mobile devices (e.g., smartphones and tablets). Web-based zero-installation and platform-agnostic apps can switch to device-to-device communication to continue benefiting people even during a disaster situation. Our approach, featuring a covert channel for professional responders and the zero-installation app, is evaluated through a prototype implementation based on a commercially available street light.Comment: 2019 IEEE Global Humanitarian Technology Conference (GHTC

    LoRe: A Programming Model for Verifiably Safe Local-First Software

    Full text link
    Local-first software manages and processes private data locally while still enabling collaboration between multiple parties connected via partially unreliable networks. Such software typically involves interactions with users and the execution environment (the outside world). The unpredictability of such interactions paired with their decentralized nature make reasoning about the correctness of local-first software a challenging endeavor. Yet, existing solutions to develop local-first software do not provide support for automated safety guarantees and instead expect developers to reason about concurrent interactions in an environment with unreliable network conditions. We propose LoRe, a programming model and compiler that automatically verifies developer-supplied safety properties for local-first applications. LoRe combines the declarative data flow of reactive programming with static analysis and verification techniques to precisely determine concurrent interactions that violate safety invariants and to selectively employ strong consistency through coordination where required. We propose a formalized proof principle and demonstrate how to automate the process in a prototype implementation that outputs verified executable code. Our evaluation shows that LoRe simplifies the development of safe local-first software when compared to state-of-the-art approaches and that verification times are acceptable.Comment: This is the extended version of the work accepted at ECOOP 202

    Future of Functional Reactive Programming in Real-Time Systems

    Get PDF
    The evolution of programming paradigms and the development of new programming languages are driven by the needs of problem domains. Functional reactive programming (FRP) combines functional programming (FP) and reactive programming (RP) concepts that leverage asynchronous dataflow from reactive programming and higher-level abstractions building blocks from functional programming to enable developers to define data flows and transformations declaratively. Declarative programming allows developers to concentrate more on the problem to be solved rather than the implementation details, resulting in efficient and concise code. Over the years, various FRP designs have been proposed in real-time application areas. Still, it remains unclear how FRP-based solutions compare with traditional methods for implementing these applications. In this survey, we studied the usefulness of FRP in some real-time applications, such as game development, animation, graphical user interface(GUI), and embedded system. We conducted a qualitative comparison for game development and studied various applications in animation, GUI, and embedded systems. We found that using FRP in these applications is quite difficult because of insufficient libraries and tools. Additionally, due to high learning curves and a need for experienced developers, the development process in FRP takes time and effort. Our examination of two well-known games: Asteroid and Pong, in three programming paradigms: imperative programming using the Unity game engine, FP in Haskell, and FRP in the Yampa library, showed that imperative programming is effective in terms of performance and usability. The other two paradigms for developing games from scratch are inefficient and challenging. Despite the fact that FRP was designed for animation, the majority of its applications are underperforming. FRP is more successful for GUI applications, where libraries like RxJS have been used in many web interfaces. FRP is also applied in developing embedded system applications for its effective memory management, maintainability, and predictability. Developing efficient solutions from scratch is not suitable in FRP due to several factors, such as poor performance compared to other programming paradigms, programming complexity, and a steep learning curve. Instead, developers can be benefited from utilizing FRP-supported modular platforms to build robust and scalable real-time applications

    Concurrency Controls in Event-Driven Programs

    Get PDF
    Functional reactive programming (FRP) is a programming paradigm that utilizes the concepts of functional programming and time-varying data types to create event-driven applications. In this paradigm, data types in which values can change over time are primitives and can be applied to functions. These values are composable and can be combined with functions to create values that react to changes in values from multiple sources. Events can be modeled as values that change in discrete time steps. Computation can be encoded as values that produce events, with combination operators, it enables us to write concurrent event-driven programs by combining the concurrent computation as events. Combined with the denotational approach of functional programming, we can write programs in a concise manner. The style of event-driven programming has been widely adopted for developing graphical user interface applications, since they need to process events concurrently to stay responsive. This makes FRP a fitting approach for managing complex state and handling of events concurrently. In recent years, real-time systems such as IoT (internet of things) applications have become an important field of computation. Applying FRP to real-time systems is still an active area of research.For IoT applications, they are commonly tasked to perform data capturing in real time and transmit them to other devices. They need to exchange data with other applications over the internet and respond in a timely manner. The data needs to be processed, for simple analysis or more computation intensive work such as machine learning. Designing applications that perform these tasks and remain efficient and responsive can be challenging. In this thesis, we demonstrate that FRP is a suitable approach for real-time applications. These applications require soft real-time requirements, where systems can tolerate tasks that fail to meet the deadline and the results of these tasks might still be useful.First, we design the concurrency abstractions needed for supporting asynchronous computation and use it as the basis for building the FRP abstraction. Our implementation is in Haskell, a functional programming language with a rich type system that allows us to model abstractions with ease. The concurrency abstraction is based on some of the ideas from the Haskell solution for asynchronous computation, which elegantly supports cancelation in a composable way. Based on the Haskell implementation, we extend our design with operators that are more suitable for building web applications. We translate our implementation to JavaScript as it is more commonly used for web application development, and implementing the RxJS interface. RxJS is a popular JavaScript library for reactive programming in web applications. By implementing the RxJS interface, we argue that our programming model implemented in Haskell is also applicable in mainstream languages such as JavaScript

    Secure Communication in Disaster Scenarios

    Get PDF
    Während Naturkatastrophen oder terroristischer Anschläge ist die bestehende Kommunikationsinfrastruktur häufig überlastet oder fällt komplett aus. In diesen Situationen können mobile Geräte mithilfe von drahtloser ad-hoc- und unterbrechungstoleranter Vernetzung miteinander verbunden werden, um ein Notfall-Kommunikationssystem für Zivilisten und Rettungsdienste einzurichten. Falls verfügbar, kann eine Verbindung zu Cloud-Diensten im Internet eine wertvolle Hilfe im Krisen- und Katastrophenmanagement sein. Solche Kommunikationssysteme bergen jedoch ernsthafte Sicherheitsrisiken, da Angreifer versuchen könnten, vertrauliche Daten zu stehlen, gefälschte Benachrichtigungen von Notfalldiensten einzuspeisen oder Denial-of-Service (DoS) Angriffe durchzuführen. Diese Dissertation schlägt neue Ansätze zur Kommunikation in Notfallnetzen von mobilen Geräten vor, die von der Kommunikation zwischen Mobilfunkgeräten bis zu Cloud-Diensten auf Servern im Internet reichen. Durch die Nutzung dieser Ansätze werden die Sicherheit der Geräte-zu-Geräte-Kommunikation, die Sicherheit von Notfall-Apps auf mobilen Geräten und die Sicherheit von Server-Systemen für Cloud-Dienste verbessert

    Concurrency and Distribution in Reactive Programming

    Get PDF
    Distributed Reactive Programming is a paradigm for implementing distributed interactive applications modularly and declaratively. Applications are defined as dynamic distributed dataflow graphs of reactive computations that depend upon each other, similar to formulae in spreadsheets. A runtime library propagates input changes through the dataflow graph, recomputing the results of affected dependent computations while adapting the dataflow graph topology to changing dependency relations on the fly. Reactive Programming has been shown to improve code quality, program comprehension and maintainability over modular interactive application designs based on callbacks. Part of what makes Reactive Programming easy to use is its synchronous change propagation semantics: Changes are propagated such that no computation can ever observe an only partially updated state of the dataflow graph, i.e., each input change together with all dependent recomputations appears to be instantaneous. Traditionally, in local single-threaded applications, synchronous semantics are achieved through glitch freedom consistency: a recomputation may be executed only after all its dependencies have been recomputed. In distributed applications though, this established approach breaks in two ways. First, glitch freedom implies synchronous semantics only if change propagations execute in isolation. Distributed applications are inherently exposed to concurrency in that multiple threads may propagate different changes concurrently. Ensuring isolation between concurrent change propagations requires the integration of additional algorithms for concurrency control. Second, applications’ dataflow graphs are spread across multiple hosts. Therefore, distributed reactive programming requires algorithms for both glitch freedom and concurrency control that are decentralized, i.e., function without access to shared memory. A comprehensive survey of related prior works shows, that none have managed to solve this issue so far. This dissertation introduces FrameSweep, the first algorithm to provide synchronous propagation semantics for concurrent change propagation over dynamic distributed dataflow graphs. FrameSweep provides isolation and glitch freedom through a combination of fine-grained concurrency control algorithms for linearizability and serializability from databases with several aspects of change propagation algorithms from Reactive Programming and Automatic Incrementalization. The correctness of FrameSweep is formally proven through the application of multiversion concurrency control theory. FrameSweep decentralizes all its algorithmic components, and can therefore be integrated into any reactive programming library in a syntactically transparent manner: Applications can continue to use the same syntax for Reactive Programming as before, without requiring any adaptations of their code. FrameSweep therefore provides the exact same semantics as traditional local single-threaded Reactive Programming through the exact same syntax. As a result, FrameSweep proves by example that interactive applications can reap all benefits of Reactive Programming even if they are concurrent or distributed. A comprehensive empirical evaluation measures through benchmarks, how FrameSweep’s performance and scalability are affected by a multitude of factors, e.g., thread contention, dataflow topology, dataflow topology changes, or distribution topology. It shows that FrameSweep’s performance compares favorably to alternative scheduling approaches with weaker guarantees in local applications. An existing Reactive Programming application is migrated to FrameSweep to empirically verify the claims of semantic and syntactic transparency
    corecore