Composable Building Blocks for Resilient Asynchronous Code

📅 2026-08-21
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
论文提出使用高阶组合子统一解决异步调用中的错误处理问题,包括超时、重试等,并保持业务逻辑不变。
📝 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.
Problem

Research questions and friction points this paper is trying to address.

asynchronous calls
transient errors
resilience
concurrency
combinators
Innovation

Methods, ideas, or system contributions that make the work stand out.

higher-order combinators
async functions
resilience and concurrency policy
uniform shape
composable building blocks
🔎 Similar Papers
No similar papers found.