‹Programming› 2024
Mon 11 - Fri 15 March 2024 Lund, Sweden
Wed 13 Mar 2024 14:15 - 14:45 at M:Teknodromen - Research Papers 2 Chair(s): Marcel Taeumel

In the paradigm of \emph{choreographic programming}, the overall behaviour of a distributed system is coded as a \emph{choreography} from a global viewpoint. The choreography can then be automatically \emph{projected} (compiled) to a correct implementation for each participant. This paradigm is interesting because it relieves the programmer from manually writing the separate send and receive actions performed by participants, which simplifies development and avoids communication mismatches.

However, the applicability of choreographic programming in the real world remains largely unexplored. The reason is twofold. First, while there have been several proposals of choreographic programming languages, none of these languages have been used to implement a realistic, widely-used protocol. Thus there is a lack of experience on how realistic choreographic programs are structured and on the relevance of the different features explored in theoretical models. Second, applications of choreographic programming shown so far are intrusive, in the sense that each participant must use exactly the code projected from the choreography. This prevents using the code generated from choreographies with existing third-party implementations of some participants, something that is very beneficial for testing or might even come as a requirement.

This paper addresses both problems. In particular, we carry out the first development in choreographic programming of a widespread real-world protocol: the Internet Relay Chat (IRC) client–server protocol. The development is based on Choral, an object-oriented higher-order choreographic programming language (choreographies can be parametric on choreographies and carry state).

We find that two of Choral’s features are key to our implementation: higher-order choreographies are used for modelling the complex interaction patterns that arise due to IRC’s asynchronous nature, while user-definable communication semantics are relevant for achieving interoperability with third-party implementations. In the process we also discover a missing piece: the capability of statically detecting that choices on alternative distributed behaviours are appropriately communicated by means of message types, for which we extend the Choral compiler with an elegant solution based on subtyping.

Our Choral implementation of IRC arguably represents a milestone for choreographic programming, since it is the first empirical evidence that the paradigm can be used to faithfully codify protocols found `in the wild’. We observe that the choreographic approach reduces the interaction complexity of our program, compared to the traditional approach of writing separate send and receive actions. To check that our implementation is indeed interoperable with third-party software, we test it against publicly available conformance tests for IRC and some of the most popular IRC client and server software. We also evaluate the performance and scalability of our implementation by performing stress tests.

Our experience shows that even if choreographic programming is still in its early life, it can already be applied to a realistic setting.

Wed 13 Mar

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

13:15 - 14:45
Research Papers 2Research Papers at M:Teknodromen
Chair(s): Marcel Taeumel University of Potsdam; Hasso Plattner Institute
13:15
30m
Talk
Reactive Programming without FunctionsVol. 8
Research Papers
Bjarno Oeyen Vrije Universiteit Brussel, Joeri De Koster Vrije Universiteit Brussel, Wolfgang De Meuter Vrije Universiteit Brussel
Link to publication DOI
13:45
30m
Talk
Provably Fair Cooperative SchedulingVol. 8
Research Papers
Reiner Hähnle TU Darmstadt, Ludovic Henrio University of Lyon - ENS Lyon - UCBL - CNRS - Inria - LIP
Link to publication DOI
14:15
30m
Talk
Real-World Choreographic Programming: Full-Duplex Asynchrony and InteroperabilityVol. 8
Research Papers
Lovro Lugović University of Southern Denmark, Fabrizio Montesi University of Southern Denmark
Link to publication DOI