cancellation
Stopping work that is no longer needed, such as a search request made obsolete by a new keystroke.
In more detail
Proper cancellation frees network, memory and CPU and prevents stale results from overwriting fresh ones. On the web the standard tool is AbortController.
Related terms
- AbortController — The standard JavaScript object for cancelling asynchronous work: its signal is handed to the work, and calling abort() cancels it.
- AbortSignal — The object from an AbortController that tells work it has been cancelled, through its aborted flag, its reason and an abort event.
- deadline propagation — Passing a request's absolute deadline to every service it calls, so each knows how much time is left.
- timeout — A limit on how long a caller waits for an answer before giving up.
Taught in
- Cancellation With AbortController And Async Signal Propagation — Frontend Architecture & Web Platform
- CustomEvent Dispatching And Decoupled Component Event Buses — Frontend Architecture & Web Platform
- Timeouts, And Avoiding Cascaded Failure — Scalable System Design & Distributed Architecture
- Monolith Versus Services: The Honest Trade Offs — Scalable System Design & Distributed Architecture