Why should not use EventEmitter for Asynchronous Operations

  Рет қаралды 4,179

Adventures in Nodeland - Matteo Collina

Adventures in Nodeland - Matteo Collina

11 ай бұрын

This video investigates why using EventEmitter with an async function is an anti-pattern. Are you using this pattern? Let me know in the comments.

Пікірлер: 7
@_benlesh
@_benlesh 11 ай бұрын
🤯TIL that EventEmitter is fundamentally broken, actually, by what is called "producer interference". It basically breaks the loop that is notifying consumers when any one of those consumers synchronously errors. This is something we fixed about Observable (and Subject) years ago because of debate in the TC39 about behavior. We shouldn't be able to `try/catch` over an `emit`. That's bad.... Amazing video, Matteo, thanks!
@augustin_
@augustin_ 11 ай бұрын
Oh super vidéo. Thanks Matteo !
@kosson
@kosson 10 ай бұрын
Super! I learned a lot. Thank you!
@famrossignon
@famrossignon 9 ай бұрын
This could be called "Why should not use Asynchronous Operations inside EventEmitter event handlers"
@adventuresinnodeland
@adventuresinnodeland 7 ай бұрын
Indeed! Things can be even more tricky, new video will come soon!
@kid1412621
@kid1412621 15 күн бұрын
So the event emitter is designed for async purpose, not async usage?
Generating Types without Climbing a Tree
20:08
Adventures in Nodeland - Matteo Collina
Рет қаралды 1,4 М.
NODE_ENV=production is a lie
18:48
Adventures in Nodeland - Matteo Collina
Рет қаралды 4,1 М.
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 43 МЛН
You Don't Know Node - ForwardJS San Francisco
35:25
ForwardJS
Рет қаралды 28 М.
AWS Fooled Devs & Sabotaged The Industry | Prime Reacts
21:47
ThePrimeTime
Рет қаралды 218 М.
Learn the Node.js Event loop (the right way)
9:39
Ahmad Awais
Рет қаралды 4,5 М.
How to make your Node.js API 5x faster!
16:39
Adventures in Nodeland - Matteo Collina
Рет қаралды 9 М.
Water powered timers hidden in public restrooms
13:12
Steve Mould
Рет қаралды 671 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 782 М.
How I combined node:test with TypeScript!
32:06
Adventures in Nodeland - Matteo Collina
Рет қаралды 1,5 М.
How I Made JavaScript BLAZINGLY FAST
10:10
ThePrimeagen
Рет қаралды 215 М.
Why I always include tests and docs when I release to npm
7:38
Adventures in Nodeland - Matteo Collina
Рет қаралды 783
Потоп из какашек??? @zackdfilms - автор анимации.
0:31
Время знаний
Рет қаралды 1,8 МЛН
All creatures are from God #jesus #jesuschrist #jesuslovesyou
0:19
Jesus By Your Side
Рет қаралды 50 МЛН
Они так быстро убрались!
1:00
Аришнев
Рет қаралды 1,5 МЛН