🤖 AI Summary
This paper addresses the lack of fault tolerance in orchestration programming for distributed applications. We propose Chorex—the first Elixir-based orchestration language supporting restartability, state recovery, and dynamic network reconfiguration. Chorex employs macro-driven metaprogramming to compile orchestration logic into stateless function collections, and integrates lightweight checkpointing with process monitoring to enable automatic restart, state rollback, and topology adaptation upon failure. Errors are statically detected at the source-code level, ensuring type safety and developer productivity. Our key contributions include: (i) the first realization of semantically consistent restart for orchestration programs; (ii) empirical validation that checkpointing overhead remains bounded; and (iii) demonstration that its projection strategy is amenable to cross-language portability. Evaluated on real-world protocols—including the high-order bookseller protocol and the Secure Remote Password protocol—Chorex exhibits high reliability and practical applicability.
📝 Abstract
We built Chorex, a language that brings choreographic programming to Elixir as a path toward robust distributed applications. Chorex is unique among choreographic languages because it tolerates failure among actors: when an actor crashes, Chorex spawns a new process, restores state using a checkpoint, and updates the network configuration for all actors. Chorex also proves that full-featured choreographies can be implemented via metaprogramming, and that doing so achieves tight integration with the host language. For example, mismatches between choreography requirements and an actor implementation are reported statically and in terms of source code rather than macro-expanded code. This paper illustrates Chorex on several examples, ranging from a higher-order bookseller to a secure remote password protocol, details its implementation, and measures the overhead of checkpointing. We conjecture that Chorex's projection strategy, which outputs sets of stateless functions, is a viable approach for other languages to support restartable actors.