Fair Join Pattern Matching for Actors (Artifact)

Authors Philipp Haller , Ayman Hussein , Hernán Melgratti , Alceste Scalas , Emilio Tuosto



PDF
Thumbnail PDF

Artifact Description

DARTS.10.2.8.pdf
  • Filesize: 0.53 MB
  • 3 pages

Document Identifiers

Author Details

Philipp Haller
  • KTH Royal Institute of Technology, Stockholm, Sweden
Ayman Hussein
  • Technical University of Denmark, Lyngby, Denmark
Hernán Melgratti
  • University of Buenos Aires & Conicet, Argentina
Alceste Scalas
  • Technical University of Denmark, Lyngby, Denmark
Emilio Tuosto
  • Gran Sasso Science Institute, L'Aquila, Italy

Acknowledgements

This work was inspired by the group discussion on "Join patterns / synchronisation - the next generation" [Dezani et al., 2022] at the Dagstuhl Seminar 21372; we thank the organisers of the meeting and Schloss Dagstuhl — Leibniz Center for Informatics for making this work possible. We thank Omar Inverso for the technical support he provided for our experimental evaluation, Roland Kuhn for fruitful discussions on the shop floor use case, António Ravara for some useful suggestions, and Antoine Sébert for an implementation of join patterns using Scala 3 macros [Sébert, 2022]. We thank the anonymous reviewers for their comments and suggestions.

Cite AsGet BibTex

Philipp Haller, Ayman Hussein, Hernán Melgratti, Alceste Scalas, and Emilio Tuosto. Fair Join Pattern Matching for Actors (Artifact). In Special Issue of the 38th European Conference on Object-Oriented Programming (ECOOP 2024). Dagstuhl Artifacts Series (DARTS), Volume 10, Issue 2, pp. 8:1-8:3, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/DARTS.10.2.8

Artifact

Artifact Evaluation Policy

The artifact has been evaluated as described in the ECOOP 2024 Call for Artifacts and the ACM Artifact Review and Badging Policy.

Abstract

Join patterns provide a promising approach to the development of concurrent and distributed message-passing applications. Several variations and implementations have been presented in the literature - but various aspects remain under-explored: in particular, how to specify a suitable notion of message matching, how to implement it correctly and efficiently, and how to systematically evaluate the implementation performance. In this work we focus on actor-based programming, and study the application of join patterns with conditional guards (i.e., the most expressive and challenging version of join patterns in literature). We formalise a novel specification of fair and deterministic join pattern matching, ensuring that older messages are always consumed if they can be matched. We present a stateful, tree-based join pattern matching algorithm and prove that it correctly implements our fair and deterministic matching specification. We present a novel Scala 3 actor library (called JoinActors) that implements our join pattern formalisation, leveraging macros to provide an intuitive API. Finally, we evaluate the performance of our implementation, by introducing a systematic benchmarking approach that takes into account the nuances of join pattern matching (in particular, its sensitivity to input traffic and complexity of patterns and guards).

Subject Classification

ACM Subject Classification
  • Software and its engineering → Formal language definitions
  • Software and its engineering → Domain specific languages
  • Software and its engineering → Concurrent programming languages
  • Software and its engineering → Distributed programming languages
  • Theory of computation → Process calculi
Keywords
  • Concurrency
  • join patterns
  • join calculus
  • actor model

Metrics

References

  1. Mariangiola Dezani, Roland Kuhn, Sam Lindley, and Alceste Scalas. Behavioural Types: Bridging Theory and Practice (Dagstuhl Seminar 21372). Dagstuhl Reports, 11(8):52-75, 2022. URL: https://doi.org/10.4230/DagRep.11.8.52.
  2. Antoine Louis Thibaut Sébert. Join-patterns for the actor model in scala 3 using macros. Master’s thesis, DTU Department of Applied Mathematics and Computer Science, 2022. Available at URL: https://findit.dtu.dk/en/catalog/62f83d3680aa6403a4ccc0ab.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail