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

Preprint Aug 2026

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

With growing complexity, distributed software systems become increasingly challenging to maintain and reason about. When implementing a distributed protocol, developers must ensure manually that the different components fit together. Choreographic programming addresses this challenge by specifying global protocols in a...

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

Concurrency is touted as the route to faster, more responsive software, yet it continues to be one of the hardest things to master in programming today. As software gets distributed over multiple CPU cores, machines, and interacts with users in real-time, it is the developer who has to orchestrate the simultaneous exec...

Madhurima Kommuru · 0 citations
Preprint Sep 2026

SkelOT: Reusing AOT Compilation Across EVM Contract Families

Ahead-of-time (AOT) compilers (e.g., revmc, evmone, and DTVM) for the Ethereum Virtual Machine (EVM) reuse compilation artifacts at contract-code-hash granularity. This granularity is poorly matched to real EVM workloads dominated by \emph{contract families}: factory-, proxy-, and template-driven deployments that share...

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

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