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.
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
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· Proceedings of the 14th Work...· 0 citations
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· International Journal of Mod...· 0 citations
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