Тёмный

Asynchrony: Under the Hood - Shelley Vohr - JSConf EU 

JSConf
Подписаться 277 тыс.
Просмотров 133 тыс.
50% 1

This talk will explore the conceptual underpinnings of asynchronous programming options, and the drawbacks and advantages to each. JS has supported callbacks since 2009, and as years have gone by it’s added support for promises, generators, and now async/await. On a surface level, each of these techniques seeks to answer a question of how to access data not immediately available, but a deeper look into how each works on a granular level will show their implementation differences and how these differences affect usage. We’ll also take a look at how intermediate values, and errors are affected by each method. I’ll walk through a series of scenarios so you can better visualize performance differences, and how each method propagates data through the stack and the event loop. Finally, I’ll talk about where the future of async may be headed. Armed with new knowledge from this deep dive, the potentially treacherous road to fully understanding async will hopefully become a smoother ride!
OMG JSConf EU is coming back in 2019 2019.jsconf.eu/

Наука

Опубликовано:

 

26 июн 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 55   
@bagoquarks
@bagoquarks 6 лет назад
Callbacks, promises, generators, and async/await all explained in 25 minutes. Well done!
@Dygear
@Dygear 4 года назад
It takes so much effort to make something complex, easy to understand. This is a really impressive talk!
@pixelpaxal
@pixelpaxal 6 лет назад
If you already have a good grasp of callbacks, promises and async/await in javascript, this talk is a good review to put these these things into perspective and language evolution context, it could help one understand when to use one over the other.
@paulalexwilson
@paulalexwilson 4 года назад
Truly understanding something requires that we have a solid appreciation of at least 1 abstraction deeper. This talk was exactly what I was looking for.
@ITWorx
@ITWorx 3 года назад
A very good explanation for promises vs callbacks, thank you!
@ClanProStarZ
@ClanProStarZ 6 лет назад
Truly impressed by this talk. I thought I knew everything about async/await and promises but she proved me wrong.
@toxicdesire8811
@toxicdesire8811 6 лет назад
Most underrated talk of entire jsconf
@mojojojo1211
@mojojojo1211 3 года назад
This is a great talk. Deserves more views!
@sandeepparmar3113
@sandeepparmar3113 5 месяцев назад
In the hell of tutorials, This is the true gem
@arunas1
@arunas1 6 лет назад
Thanks @Shelley Vohr! Good job!
@maltegb
@maltegb 3 года назад
Great talk! Everything clearly explained
@makhdv
@makhdv 6 лет назад
Thanks! Needed some time to get use to academic style.
@sijanshrestha7278
@sijanshrestha7278 5 лет назад
yup i had to use notebook to write, but was explained clearly :) :D
@sKopheK
@sKopheK Год назад
probably cause she read it
@kps2642
@kps2642 6 лет назад
awesome talk, thank you.
@nztuber
@nztuber 4 года назад
Great stuff! At 5:38 to be clear, the execution order suggested on the right is not true for *all* callbacks, only *asynchronous* callbacks. (If they are synchronous callbacks then the invocation order would be doA, doB, doC, doD, doE, doF)
@rtech8779
@rtech8779 4 года назад
yaa thats right its applicable for async calls only, for sync call it will wait in the call stack.
@yuansizhu6271
@yuansizhu6271 2 года назад
So that's why callbacks are not guaranteed to be asynchronous. But promises are, even when they are already resolved/rejected.
@payphones
@payphones 6 лет назад
21:00 actually made me go "ohhhhhhhhhh"
@alexagna
@alexagna 6 лет назад
Indeed ! The combination of destructuring, async/await and Promise.all() to have a non-blocking version of multiple await is really smart
@sanderd17
@sanderd17 5 лет назад
I wanted to have seen this talk so much earlier. Very well done.
@randy4ii411
@randy4ii411 2 года назад
Thanks for the awesome lesson.
@josephlee5829
@josephlee5829 2 года назад
Excellent Job explaining!
@dixztube
@dixztube Год назад
This was so goood. Great job!
@jameswon5497
@jameswon5497 4 года назад
Really great talk!
@abhikumar2469
@abhikumar2469 5 лет назад
Damn...! this engineer got some serious and rare content on callback, promises and async/await.
@Mostafaabobakr7
@Mostafaabobakr7 5 лет назад
Love the Intro Music
@ssougnez
@ssougnez 6 лет назад
Awesome ! It would be even more perfect with a mention to Observables though. But congratulation, very clear and sweet to listen to :-D
@ahmedal-obaidi792
@ahmedal-obaidi792 4 года назад
pretty much reading "YDKJS: async & performance"
@singingofstars
@singingofstars 5 лет назад
Nice job. Easy to understand.
@vscode4232
@vscode4232 3 года назад
Great talk
@Henrique-yw1rb
@Henrique-yw1rb 6 лет назад
First slide is a meme of Nazaré, a character from a famous tv show here in brazil! LOL
@alabidavid4674
@alabidavid4674 4 года назад
Generators could have an end. That's property done set to true in which case they stop yield anything but done:true. Also, you can terminate generators by return();
@enzoscardamaglia9565
@enzoscardamaglia9565 4 года назад
"Since they're not running in the top-down sequential order you might expect." at 05:57. Has anyone tried that out? If I'm not mistaken in Node, FF, Chrome and Edge the functions run exactly in the sequential order I'm expecting.
@electroaddiction
@electroaddiction 4 года назад
Since every callback is asynchronous (eg: setTimeout(cb, 0)), it will execute in the order specified.
@floopy312
@floopy312 5 лет назад
13:21 Can somebody write me a piece of code with an "infinite microtask loop" like she mentions, I'm not sure how you can do that.
@monolizm
@monolizm 5 лет назад
you can find the answer here at 27 min ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cCOL7MC4Pl0.html.
@romankos3283
@romankos3283 5 лет назад
const loop = () => Promise.resolve(loop); loop();
@asianfoodie5908
@asianfoodie5908 3 года назад
Well executed!! most of the time i ignored error handling, not anymore :)
@anastazjawrobel8040
@anastazjawrobel8040 3 года назад
Super :)
@biboswanroy6699
@biboswanroy6699 4 года назад
I aren't yet sure of the role of queues and their scope exactly.
@terranova3941
@terranova3941 4 года назад
I just watched this prior and is maybe what you are looking for: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-8aGhZQkoFbQ.html
@hkjpotato
@hkjpotato 2 года назад
good summary of you dont know JS 1. now. and then, run to complete, continuation, trust. Exception is sync? 2. yield control to event loop? 3. promise is microtask queue, a placeholder of a future status 4. before anyelse can happen
@HarshitSharma-cd4tr
@HarshitSharma-cd4tr 3 года назад
Every Single time you call dot then on a promise it creates and return a new promise
@halakhita_hk
@halakhita_hk 4 года назад
good ..
@giullianopaz8262
@giullianopaz8262 5 лет назад
Brazilian meme in the first slide haha
@dumbfailurekms
@dumbfailurekms 9 месяцев назад
i googled her name and looked at her github and immediately realized i have no fking chance in this field
@BinaryReader
@BinaryReader 5 лет назад
Inversion of Control doesn't cause significant trust issues.
@ElChitarrino
@ElChitarrino 2 года назад
Really great stuff there, thanks a lot! However, I feel the urge to mention it's quite hard to follow due to your verbal breaks each 3-5 syllables. No offense intended.
@nischalofchrist
@nischalofchrist 2 года назад
great lesson, learnt a lot, but she should really evaluate how to dress when you are invited to be a speaker in such a huge event.
@kazmonroy
@kazmonroy Год назад
Have you seen how other male developers dress when they go to other big conferences? Geez. She's totally fine.
@felipepino834
@felipepino834 Год назад
Quiero aprender inglés 😪😪😪🥺 para entender mejor. Y si ya se que RU-vid tiene subtitulos gracias
@philliplam2704
@philliplam2704 11 месяцев назад
Her expertise on this shit is srsly turning me on 😂
Далее
Lin Clark: A Cartoon Intro to WebAssembly | JSConf EU
29:41
Beautiful game!😍
00:20
Просмотров 3,2 млн
DAD LEFT HIS OLD SOCKS ON THE COUCH…😱😂
00:24
Advanced Async and Concurrency Patterns in JavaScript
39:43
The Node.js Event Loop: Not So Single Threaded
31:54
Просмотров 165 тыс.