Beyond Promises: Async Patterns in JavaScript
summary
Hands-on tour of patterns that replace callbacks with concrete code and results: Node + Socket.IO chat proves callbacks work but read poorly; Promises give composable futures; async/await shortens control flow; RxJS consumes a 200ms stream, takes the first ten values and reduces them to one; channel-style CSP uses generators to produce and consume ten values without blocking; an actor demo with the comedy library sends a message and runs a blocking computation off-thread so the main loop keeps printing dots; Babel is used for newer generator/await syntax.
AI-written summary · about
chapters (18)
- 0:00Intro
- 2:38Sleep function
- 3:58Progress function
- 6:15Name functions
- 7:52Ik specification
- 9:13Rewrite server example
- 10:59Async
- 11:21Async Example
- 13:02Reactive Async
- 15:11Lazy Async
- 16:57oops
- 18:19Channels
- 19:21Generators
- 20:34Business Implementation
- 24:21Reactive Extensions
- 26:56Terminal Exercise
- 29:28Actor Based Programming
- 39:32Summary
related talks
45mNext Generation Asynchronous Patterns in JavaScript
41mNext Generation Asynchronous Patterns in JavaScript
14mThe Promised Path to Async, Awaits
32mPromises Are So Passé
22mFrom Promises through Generators to async/await in node.js
01h 04m5 architectures of asynchronous JavaScript
30mParadigms for dealing with asynchrony
26mRethink Async
