Koa and the Evolution of Middleware
summary
Koa v1 used generator-based middleware while Koa v2 moves to async/await, and koa-convert lets older generator middleware run on the new API. The presenter argues async/await makes middleware chains linear and maintainable, with benchmarks showing only a small runtime cost; a Dockerized production backend (Ficus) runs on Koa to demonstrate viability. Generators remain useful for custom runners and cancellation patterns (à la redux-saga), and native async/await is arriving in Node.
AI-written summary · about
chapters (26)
- 0:00Introduction
- 1:03Service history
- 2:33Async JavaScript issues
- 3:56Express popularity
- 5:46New language need
- 8:26JS server frameworks
- 10:12Middleware concept
- 12:44Callback hell
- 13:06Generators for async
- 21:13Generators for async
- 23:41Async/await intro
- 26:54Koa 2 benefits
- 27:56Koa minimalism
- 29:04Generator to Koa 2
- 30:30Koa in production
- 31:12Generators in JS
- 31:55Generators in Redux Saga
- 34:30Canceling async ops
- 35:57Custom generator runners
- 38:30Summary: middleware tools
- 39:57Koa vs Express vs async/await
- 40:40Q&A
- 42:08Q&A
- 43:11Q&A
- 44:59Q&A
- 46:47Microservices
related talks
22mFrom Promises through Generators to async/await in node.js
32mThe Evolution Of Asynchronous Javascript
25mAsynchrony: Under the Hood
01h 27mNew features in Node.js 8.x
57mThe Evolution of a Multifaceted Node.js Project Architecture
45mFrom Zero to Live with Functional JavaScript Applications (Part 1)
47mA Tale of Two Asyncs: Open Source Language Design in Rust and Node.js
43mWe're the Same You and Me - a New Way ☯ to Align Programming Paradigms Across Client & Server(less)
