Skip to content
Preprint

Composable Building Blocks for Resilient Asynchronous Code

Aug 2026 · 0 citations · 13 references
Computer Science

TL;DR

This work shows how higher-order combinators solve higher-order problems of asynchronous calls to a network service, database, or language model uniformly, including timeouts, retries, rate limiting, caching, reentrant locking, and cancellation.

Abstract

Asynchronous calls to a network service, database, or language model must cope with transient errors, slow or missing responses, throttling, and atomicity violations. We show how higher-order combinators solve such problems uniformly, including timeouts, retries, rate limiting, caching, reentrant locking, and cancellation. Every combinator maps an async function to another of the same type, so they share a uniform \emph{shape} and compose by nesting into one expression that implements a program's whole resilience and concurrency policy, leaving its business logic untouched. The same design spans both of JavaScript's native async shapes, promise-returning and async-iterable-returning functions, with one vocabulary of concerns. Solutions exist across the ecosystem but are scattered over differently shaped libraries that are hard to combine. We present case studies where the combinators are used to harden real packages by adding missing resilience or concurrency control and replacing bespoke policy.

View source

Similar papers

Book Open access Aug 2026

On Eliminating the Impossible with Dependent Types: Choreographic Libraries with Proof-Carrying Located Values

This work uses the dependently typed Lean programming language to implement a similar choreographic library, ChorLean, which ensures total EPP and safe value access via proof-carrying located values, passing Lean's totality checker without undefined cases, while supporting the same feature set as libraries like MultiCh...

Simon Daniel, Timon Böhler, D. Richter et al. · 0 citations
Book Open access Sep 2026

DeterV: Verifying Deterministic Parallel Execution

DeterV is a deterministic parallel runtime which uses Verus to verify its correctness and equivalence to serial execution in the input order and attains a 3:1 proof-to-code ratio and incurs only trivial runtime overhead compared to an unverified baseline.

Zheng-Qing Liu, Marios Kogias · 0 citations
Open access 2022

Concurrency is hard: Java vs Python pitfalls you can't ignore

This paper examines the practical challenges developers face when implementing concurrency in Java and Python by first presenting a comparative analysis of two very popular programming languages, namely Java and Python, and explains how minor oversights can result in massive outages.

Madhurima Kommuru · 0 citations
Preprint Oct 2026

Modular Responsiveness Verification of Rust Async Runtimes

This work presents a lightweight and modular proof technique for verifying eventual progression guarantees for Rust async runtimes and realizes this proof technique as a set of static analyses for Rust and uses these to verify eventual progression of several key components of multiple Rust async runtime implementations...

Yan-Ze Li, I. Beschastnikh, Alexander J. Summers · 0 citations
Preprint Sep 2026

SkelOT: Reusing AOT Compilation Across EVM Contract Families

An AOT framework that lifts the unit of compilation reuse from code hash to family skeleton at contract-code-hash granularity and delivers a median per-contract speedup across family members under a compile budget targeting 75% execution-time coverage.

Si-Peng Xie, Qian-Hong Wu, Ming-Hang Li et al. · 0 citations

Agentic translation of C to Rust

An alternate agentic approach that gives an LLM freedom and guardrails is presented that gives an LLM freedom and guardrails in the Rust programming language, a promising replacement for C.

Benedikt Schesch, Michael D. Ernst · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.