arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.05417cs.PLcs.DC
收藏

我知你知我知:具备多播与多位置值的编排编程

We Know I Know You Know; Choreographic Programming With Multicast and Multiply Located Values

Mako Bates, Joseph P. Near

AI总结:

针对传统编排编程需插入select操作保证通信一致的问题,提出支持多位置值与多播的新型编排语言He-Lambda-Small,通过条件判定值多位置化替代select,类型良好即可保证无死锁,可简洁编码复杂通信模式。

摘要:

并发分布式系统的构建与推理向来是公认的难题。编排编程是近年兴起的范式,通过名为编排(choreography)的单一全局程序描述分布式系统。编排可简化分布式系统的推理过程,还能通过静态分析确保无死锁。在以往的编排编程语言中,每个值仅位于单个参与方,程序员需要插入特殊的无类型“select”操作,以保证所有参与方遵循相同的通信模式。\n我们提出He-Lambda-Small,这是一种支持多位置值(Multiply Located Values)的新型编排编程语言。He-Lambda-Small支持向一组参与方多播数据,生成的值将存在于所有参与方节点。该方法为“select”提供了简洁优雅的替代方案:He-Lambda-Small要求条件语句的判定值必须位于所有相关参与方。在He-Lambda-Small中,只需验证编排程序类型良好,即可证明其无死锁。我们通过多个案例研究表明,利用多位置值可以简洁编码以往工作中描述的复杂通信模式,无需使用“select”或冗余通信。

英文摘要:

Concurrent distributed systems are notoriously difficult to construct and reason about. Choreographic programming is a recent paradigm that describes a distributed system in a single global program called a choreography. Choreographies simplify reasoning about distributed systems and can ensure deadlock freedom by static analysis. In previous choreographic programming languages, each value is located at a single party, and the programmer is expected to insert special untyped "select" operations to ensure that all parties follow the same communication pattern. We present He-Lambda-Small, a new choreographic programming language with Multiply Located Values. He-Lambda-Small allows multicasting to a set of parties, and the resulting value will be located at all of them. This approach enables a simple and elegant alternative to "select": He-Lambda-Small requires that the guard for a conditional be located at all of the relevant parties. In He-Lambda-Small, checking that a choreography is well-typed suffices to show that it is deadlock-free. We present several case studies that demonstrate the use of multiply-located values to concisely encode tricky communication patterns described in previous work without the use of "select" or redundant communication.

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

↑