Versatile Event Correlation with Algebraic Effects

Journal Article (2018)
Author(s)

Oliver Bračevac (Technische Universität Darmstadt)

Nada Amin (University of Cambridge)

Guido Salvaneschi (Technische Universität Darmstadt)

Sebastian Erdweg (TU Delft - Programming Languages)

Patrick Eugster (University of Lugano)

Mira Mezini (Technische Universität Darmstadt)

Research Group
Programming Languages
Copyright
© 2018 Oliver Bračevac, Nada Amin, Guido Salvaneschi, S.T. Erdweg, Patrick Eugster, Mira Mezini
DOI related publication
https://doi.org/10.1145/3236762
More Info
expand_more
Publication Year
2018
Language
English
Copyright
© 2018 Oliver Bračevac, Nada Amin, Guido Salvaneschi, S.T. Erdweg, Patrick Eugster, Mira Mezini
Research Group
Programming Languages
Issue number
ICFP
Volume number
2
Pages (from-to)
1-31
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

We present the first language design to uniformly express variants of n-way joins over asynchronous event streams from different domains, e.g., stream-relational algebra, event processing, reactive and concurrent programming. We model asynchronous reactive programs and joins in direct style, on top of algebraic effects and handlers. Effect handlers act as modular interpreters of event notifications, enabling fine-grained control abstractions and customizable event matching. Join variants can be considered as cartesian product computations with ”degenerate” control flow, such that unnecessary tuples are not materialized a priori. Based on this computational interpretation, we decompose joins into a generic, naive enumeration procedure of the cartesian product, plus variant-specific extensions, represented in terms of user-supplied effect handlers. Our microbenchmarks validate that this extensible design avoids needless materialization. Alongside a formal semantics for joining and prototypes in Koka and multicore OCaml, we contribute a systematic comparison of the covered domains and features.