Conference item
Deadlock-free asynchronous message reordering in rust with multiparty session types
- Abstract:
- 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 computation-communication overlap (a popular optimisation in message-passing 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 deadlock-freedom. For this, Rumpsteak incorporates two recent advanced session type theories: (1) k-multiparty compatibility (k-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 k-MC and a binary session subtyping algorithm. We find they are exponentially slower than Rumpsteak's.
- Publication status:
- Published
- Peer review status:
- Peer reviewed
Actions
Access Document
- Files:
-
-
(Preview, Accepted manuscript, pdf, 1.1MB, Terms of use)
-
- Publisher copy:
- 10.1145/3503221.3508404
Authors
+ Engineering and Physical Sciences Research Council
More from this funder
- Grant:
- EP/X015955/1 - 316931
- EP/N028201/1 - 72043/2
- EP/T014709/1
- EP/T006544/1
- EP/N027833/1
- 309899
- Publisher:
- Association for Computing Machinery
- Host title:
- Proceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP 2022)
- Pages:
- 246-261
- Publication date:
- 2022-03-28
- Event title:
- 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP 2022)
- Event location:
- Seoul, South Korea
- Event website:
- https://ppopp22.sigplan.org/
- Event start date:
- 2022-04-02
- Event end date:
- 2022-04-06
- DOI:
- ISBN:
- 9781450392044
- Language:
-
English
- Pubs id:
-
1310404
- Local pid:
-
pubs:1310404
- Deposit date:
-
2024-02-27
Terms of use
- Copyright holder:
- Cutner et al
- Copyright date:
- 2022
- Rights statement:
- © 2022 Copyright held by the owner/author(s). Publication rights licensed to ACM.
- Notes:
- This paper was presented at the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP 2022), 2nd-6th April 2022, Seoul, South Korea. This is the accepted manuscript version of the article. The final version is available online from Association for Computing Machinery at: https://dx.doi.org/10.1145/3503221.3508404
If you are the owner of this record, you can report an update to it here: Report update to this record