arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.20942cs.PL
收藏

Accompanist:一种用于鲁棒编舞编程的运行时

Accompanist: A Runtime for Resilient Choreographic Programming

University of Southern Denmark(南丹麦大学)

Viktor Strate Kløvedal, Dan Plyukhin, Marco Peressotti, Fabrizio Montesi

AI总结:

本文提出Accompanist运行时,通过与可定制运行时协同设计,使编舞编程在去中心化环境下实现鲁棒性,无需修改编译器,支持在现有代码库中部署。

摘要:

在面向服务架构中,服务协调有两种方式:直接点对点通信或通过中介 orchestator。 orchestator 更受欢迎,因其本地状态是正在进行工作流状态的'单一真相源',简化了使用'saga'模式的分布式事务的故障恢复和回滚。但 orchestration 不总是可行,因为硬件限制和安全策略。没有中央 orchestator,鲁棒的 saga 事务难以正确实现。一个自然的想法是使用编舞编程范式,将 orchestator 的'全局视图'带到去中心化环境。不幸的是,编舞编程依赖于对网络可靠性和服务 uptime 的强假设,这些假设往往不成立。近期工作通过'故障感知'语言特性弱化了一些假设,但这些特性使程序更复杂。我们提出一种互补方法:将编程接口与可定制运行时协同设计,使运行时能够回放计算以掩盖故障。我们的方法保持程序简单,不需要修改编译器,并且在形式证明中支持清晰的分工分离。我们提出了Accompanist,一种用于Choral编舞编程语言的鲁棒运行时。使用Accompanist,程序员可以将去中心化saga事务实现为编舞程序,并将编译后的代码部署到'sidecars'中,这些sidecars在现有代码库中与服务并行运行。我们的关键假设是编舞程序应为确定性,saga中的事务应为幂等,且消息应写入持久化消息队列。基于这些假设,我们提出了一个形式模型,并证明目标代码是正确构造的。

英文摘要:

In service-oriented architecture, services coordinate in one of two ways: directly, using point-to-point communication, or indirectly, through an intermediary called the orchestrator. Orchestrators tend to be more popular because their local state is a 'single source of truth' for the status of ongoing workflows, which simplifies fault recovery and rollback for distributed transactions that use the 'saga' pattern. But orchestration is not always an option because of hardware constraints and security policies. Without a central orchestrator, resilient saga transactions are hard to implement correctly. A natural idea is to use choreographic programming, a paradigm that brings the 'global view' of orchestrators to a decentralised setting. Unfortunately, choreographic programming relies on strong assumptions about network reliability and service uptime that often do not hold. Recent work weakens some of these assumptions with 'failure-aware' language features, but these features make programs more complex. We propose a complementary approach: to co-design the programming interface with a customizable runtime that can replay computation to mask faults. Our approach keeps programs simple, does not require modifying the compiler, and lends itself to a clean separation of concerns in formal proofs. We present Accompanist, a resilient runtime for the Choral choreographic programming language. With Accompanist, programmers can implement decentralised saga transactions as choreographic programs and deploy the compiled code to 'sidecars' that run alongside services in a pre-existing codebase. Our key assumptions are that choreographic programs should be deterministic, transactions within a saga should be idempotent, and messages should be written to a durable message queue. Based on these assumptions, we present a formal model and prove that target code is correct-by-construction.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑