Lune

PPoPP2022顶会

Deadlock-free asynchronous message reordering in rust with multiparty session types

Zak Cutner, Nobuko Yoshida, Martin Vassor

摘要

Rust is a modern systems language focused on performance and reliability. Complementing Rust's promise to provide "fearless concurrency", developers frequently exploit asynchronous message passing. Unfortunately, sending and receiving messages in an arbitrary order to maximise computationcommunication overlap (a popular optimisation in messagepassing applications) opens up a Pandora's box of subtle concurrency bugs.

To guarantee deadlock-freedom by construction, we present Rumpsteak: a new Rust framework based on multiparty session types. Previous session type implementations in Rust are either built upon synchronous and blocking communication and/or are limited to two-party interactions. Crucially, none support the arbitrary ordering of messages for efficiency.

Rumpsteak instead targets asynchronous async/await code. Its unique ability is allowing developers to arbitrarily order send/receive messages while preserving deadlockfreedom. For this, Rumpsteak incorporates two recent advanced session type theories: (1) 𝑘-multiparty compatibility (𝑘-MC), which globally verifies the safety of a set of participants, and (2) asynchronous multiparty session subtyping, which locally verifies optimisations in the context of a single participant. Specifically, we propose a novel algorithm for asynchronous subtyping that is both sound and decidable.

We first evaluate the performance and expressiveness of Rumpsteak against three previous Rust implementations. We discover that Rumpsteak is around 1.7-8.6x more efficient and can safely express many more examples by virtue of offering arbitrary ordering of messages. Secondly, we analyse the complexity of our new algorithm and benchmark it against 𝑘-MC and a binary session subtyping algorithm. We find they are exponentially slower than Rumpsteak's.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Characterizing Implementability of Global Protocols with Infinite States and Data 引用了 Statically verified refinements for multiparty protocols
  • Precise subtyping for asynchronous multiparty sessions 引用了 CAMP: cost-aware multiparty session protocols
  • Top-Down = Bottom-Up: Sound and Complete Characterisations of Liveness by Multiparty Global Protocols 引用了 Characterizing Implementability of Global Protocols with Infinite States and Data
  • Top-Down = Bottom-Up: Sound and Complete Characterisations of Liveness by Multiparty Global Protocols 引用了 Precise subtyping for asynchronous multiparty sessions
  • Top-Down = Bottom-Up: Sound and Complete Characterisations of Liveness by Multiparty Global Protocols 引用了 Statically verified refinements for multiparty protocols
  • Top-Down = Bottom-Up: Sound and Complete Characterisations of Liveness by Multiparty Global Protocols 引用了 CAMP: cost-aware multiparty session protocols
  • Top-Down = Bottom-Up: Sound and Complete Characterisations of Liveness by Multiparty Global Protocols 引用了 Top-Down or Bottom-Up? Complexity Analyses of Synchronous Multiparty Session Types
  • CAMP: cost-aware multiparty session protocols 引用了 Statically verified refinements for multiparty protocols
  • Top-Down or Bottom-Up? Complexity Analyses of Synchronous Multiparty Session Types 引用了 Precise subtyping for asynchronous multiparty sessions
  • Implementability of Global Distributed Protocols Modulo Network Architectures 引用了 Characterizing Implementability of Global Protocols with Infinite States and Data
  • Implementability of Global Distributed Protocols Modulo Network Architectures 引用了 Statically verified refinements for multiparty protocols
  • Implementability of Global Distributed Protocols Modulo Network Architectures 引用了 Top-Down or Bottom-Up? Complexity Analyses of Synchronous Multiparty Session Types
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. Top-Down or Bottom-Up? Complexity Analyses of Synchronous Multiparty Session TypesThien Udomsrirungruang, Nobuko YoshidaPOPL 2025 · 7 次引用
  2. Characterizing Implementability of Global Protocols with Infinite States and DataElaine Li, Felix Stutz, Thomas Wies, Damien ZuffereyOOPSLA 2025 · 2 次引用
  3. Top-Down = Bottom-Up: Sound and Complete Characterisations of Liveness by Multiparty Global ProtocolsKai Pischke, Nobuko YoshidaOOPSLA 2026
  4. Implementability of Global Distributed Protocols Modulo Network ArchitecturesElaine Li, Thomas WiesPLDI 2026

它引用的 Paper4

  1. Understanding memory and thread safety practices and issues in real-world Rust programsBoqin Qin, Yilun Chen, Zeming Yu, Linhai Song 等PLDI 2020 · 112 次引用
  2. Statically verified refinements for multiparty protocolsFangyi Zhou, Francisco Ferreira, Raymond Hu, Rumyana Neykova 等OOPSLA 2020 · 38 次引用
  3. Precise subtyping for asynchronous multiparty sessionsSilvia Ghilezan, Jovanka Pantovic, Ivan Prokic, Alceste Scalas 等POPL 2021 · 26 次引用
  4. CAMP: cost-aware multiparty session protocolsDavid Castro-Perez, Nobuko YoshidaOOPSLA 2020 · 16 次引用

相关 Paper

  1. Separation and Encodability in Mixed Choice Multiparty SessionsKirstin Peters, Nobuko YoshidaLICS 2024 · 10 次引用
  2. Hybrid Multiparty Session Types: Compositionality for Protocol Specification through Endpoint ProjectionLorenzo Gheri, Nobuko YoshidaOOPSLA 2023 · 5 次引用
  3. Mixtris: Mechanised Higher-Order Separation Logic for Mixed Choice Multiparty Message PassingJonas Kastberg Hinrichsen, Iwan Quémerais, Lars BirkedalOOPSLA 2026
  4. Verified Lock-Free Session Channels with LinkingThomas Somers, Robbert KrebbersOOPSLA 2024 · 2 次引用
  5. Mixed Choice in Asynchronous Multiparty Session TypesLaura Bocchi, Raymond Hu, Adriana Laura Voinea, Simon ThompsonOOPSLA 2026
黄昏的海面,两侧是细线勾勒的悬崖