Efficient, Portable, Census-Polymorphic Choreographic Programming

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Bates, Mako, Kashiwa, Shun, Jafri, Syed, Shen, Gan, Kuper, Lindsey, Near, Joseph P.
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910917581602816
author Bates, Mako
Kashiwa, Shun
Jafri, Syed
Shen, Gan
Kuper, Lindsey
Near, Joseph P.
author_facet Bates, Mako
Kashiwa, Shun
Jafri, Syed
Shen, Gan
Kuper, Lindsey
Near, Joseph P.
contents Choreographic programming (CP) is a paradigm for implementing distributed systems that uses a single global program to define the actions and interactions of all participants. Library-level CP implementations, like HasChor, integrate well with mainstream programming languages but have several limitations: Their conditionals require extra communication; they require specific host-language features (e.g., monads); and they lack support for programming patterns that are essential for implementing realistic distributed applications. We make three contributions to library-level CP to specifically address these challenges. First, we propose and formalize conclaves and multiply-located values, which enable efficient conditionals in library-level CP without redundant communication. Second, we propose end-point projection as dependency injection, a design pattern that enables library-level CP in host languages without support for monads. Third, we propose census polymorphism, a technique for abstracting over the number of participants in a choreography. We demonstrate these contributions via implementations in Haskell, Rust, and TypeScript.
format Preprint
id arxiv_https___arxiv_org_abs_2412_02107
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Efficient, Portable, Census-Polymorphic Choreographic Programming
Bates, Mako
Kashiwa, Shun
Jafri, Syed
Shen, Gan
Kuper, Lindsey
Near, Joseph P.
Programming Languages
Choreographic programming (CP) is a paradigm for implementing distributed systems that uses a single global program to define the actions and interactions of all participants. Library-level CP implementations, like HasChor, integrate well with mainstream programming languages but have several limitations: Their conditionals require extra communication; they require specific host-language features (e.g., monads); and they lack support for programming patterns that are essential for implementing realistic distributed applications. We make three contributions to library-level CP to specifically address these challenges. First, we propose and formalize conclaves and multiply-located values, which enable efficient conditionals in library-level CP without redundant communication. Second, we propose end-point projection as dependency injection, a design pattern that enables library-level CP in host languages without support for monads. Third, we propose census polymorphism, a technique for abstracting over the number of participants in a choreography. We demonstrate these contributions via implementations in Haskell, Rust, and TypeScript.
title Efficient, Portable, Census-Polymorphic Choreographic Programming
topic Programming Languages
url https://arxiv.org/abs/2412.02107