~/talk

Callbacks to Async/Await in Node.js

Talkat Geekle Free Online DevOps+JS Conference 2020 · on Tuesday, 2020-04-07· [nodejs, javascript]
slides:none on file

Shows that native ES6 promises catch up and often beat Bluebird: measured on Node 10 a ~200ms gap, on Node 12 native promises 1.1s vs Bluebird 1.96s; enabling async_hooks makes native promises much slower. Uses nvm, Node 10/12, Bluebird, async_hooks, Express and autocannon for load tests. Demo converts serial awaits into Promise.all parallelism (8 DB calls) and gets median latency down (16ms → 10ms), 97th percentile 41ms → 32ms and throughput 52 rps → 72 rps. Also ships a tiny JS Promise implementation that runs.

AI-written summary · about

  1. 0:00Start
  2. 2:03Tamar Twena-Stern
  3. 5:33Node.js Architecture - Non Blocking 10
  4. 7:05Asynchronous Programming
  5. 7:39Asynchronous Code Example
  6. 8:10The Pyramid Of Doom
  7. 8:41Easy To Miss Error Handling
  8. 9:23Correct Error Handling
  9. 10:40What Is A Promise
  10. 11:19Promise - Explained
  11. 12:08Promises Code
  12. 12:36Promise Libraries
  13. 19:34What Is An Async Function
  14. 20:34Some Async Await Code
  15. 21:18Clear Error Handling
  16. 21:40Intermediate Values
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.