Real-World Choreographic Programming: An Experience Report

03/07/2023
by   Lovro Lugović, et al.
0

Choreographic programming is a programming paradigm, whereby the overall behaviour of a distributed system is coded as a choreography from a global viewpoint. The choreography can then be automatically compiled (projected) to a correct implementation for each participant. Choreographic programming relieves the programmer from manually writing the separate send and receive actions performed by participants and avoids the problem of communication mismatches. However, the applicability of this paradigm in the real world remains largely unexplored for two reasons. First, while there have been several proposals of choreographic programming languages, none of them 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 features explored in theoretical models. Second, applications of choreographic programming shown so far are intrusive since each participant must use exactly the code projected from the choreography. This prevents using the projected code with existing third-party implementations of some participants. We carry out the first development in choreographic programming of a widespread real-world protocol: the Internet Relay Chat (IRC) protocol. Our development is based on Choral, an object-oriented choreographic programming language. Two of Choral's features are key to our implementation: higher-order choreographies for modelling the complex interaction patterns due to IRC's asynchronous nature; and user-definable communication semantics for achieving interoperability with third-party implementations. 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. We extend the Choral compiler with an elegant solution based on subtyping.

READ FULL TEXT

page 8

page 12

page 14

page 16

page 18

page 22

page 23

page 25

research
03/08/2023

Alice or Bob?: Process Polymorphism in Choreographies

We present PolyChorλ, a language for higher-order functional choreograph...
research
03/07/2023

Certified Compilation of Choreographies with hacc

Programming communicating processes is challenging, because it requires ...
research
09/14/2020

Statically Verified Refinements for Multiparty Protocols

With distributed computing becoming ubiquitous in the modern era, safe d...
research
11/28/2017

Communications in Choreographies, Revisited

Choreographic Programming is a paradigm for developing correct-by-constr...
research
12/14/2017

Choreographies meet Communication Failures

Choreographies are global descriptions of communication structures, insp...
research
07/17/2018

Merlin: A Language Server for OCaml (Experience Report)

We report on the experience of developing Merlin, a language server for ...
research
01/24/2018

Choreographies for Reactive Programming

Modular programming is a cornerstone in software development, as it allo...

Please sign up or login with your details

Forgot password? Click here to reset