Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Getting started with node.js @ AngleBrackets 2018
Search
Asim Hussain
March 26, 2018
Programming
1
180
Getting started with node.js @ AngleBrackets 2018
Less getting started and more deep dive into asynchronous non-blocking event-driven programming.
Asim Hussain
March 26, 2018
Tweet
Share
More Decks by Asim Hussain
See All by Asim Hussain
JavaScript Saves The World - DotJS 2019
jawache
0
890
Saving the world, one line at a time [CodeLeaders Australia 2019]
jawache
0
76
YGLF_2019.pdf
jawache
1
140
AI + JavaScript Rocks @ GDGDevFest UA 2018
jawache
0
50
How to hack a web app? WebConfAsia 2018
jawache
0
84
How to scale an SPA? @ AmsterdamJS 2018
jawache
0
29
How to hack an Angular app? - ngConf 2018
jawache
0
950
How to hack an Angular app? @ ngVikings 2018
jawache
1
1.1k
How to hack a python app? @ PyCaribbean 2018
jawache
0
160
Other Decks in Programming
See All in Programming
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
210
ワイがおすすめする新潟の食 / 20250530phpconf-niigata-eve
kasacchiful
0
300
SODA - FACT BOOK
sodainc
1
840
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
760
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
200
Bytecode Manipulation 으로 생산성 높이기
bigstark
1
290
プロダクト開発でも使おう 関数のオーバーロード
yoiwamoto
0
150
Cloudflare Realtime と Workers でつくるサーバーレス WebRTC
nekoya3
0
390
カクヨムAndroidアプリのリブート
numeroanddev
0
410
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
920
機械学習って何? 5分で解説頑張ってみる
kuroneko2828
0
200
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
350
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
4
130
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Code Review Best Practice
trishagee
68
18k
The World Runs on Bad Software
bkeepers
PRO
68
11k
It's Worth the Effort
3n
184
28k
BBQ
matthewcrist
89
9.7k
4 Signs Your Business is Dying
shpigford
184
22k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
780
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
690
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Transcript
Getting started with Node.js @jawache AngleBrackets 2018
Asim Hussain @jawache codecraft.tv microsoft.com @jawache
https://aka.ms/jawache-cda @jawache
@jawache
Agenda @jawache
• What is Node? • Asynchronous vs Synchronous • Asynchronous
Patterns • Event Loop Agenda @jawache
Assumptions @jawache
• Experienced developers • Know JavaScript • Even the new
stuff Assumptions @jawache
What is Node? @jawache
What is V8? @jawache
@jawache https://github.com/v8/v8/wiki
@jawache https://github.com/nodejs/node
@jawache https://nodejs.org
@jawache https://github.com/nodejs/node-chakracore https://github.com/Microsoft/ChakraCore
Async vs Sync @jawache
@jawache Sync is Blocking Async is Non-Blocking
@jawache
@jawache Analyse Text
None
"Blocking is a made up construct" - Asim @jawache
@jawache
@jawache
"Blocking is bad if your app deals with a lot
of I/O" - Asim @jawache
Async Solution #1 @jawache Threads
@jawache
Multi-Threading is Hard! @jawache
Async Solution #2 @jawache Events
Node abstracts all I/O interactions into events that are handled
on an implicit eventloop. @jawache
Node is single threaded * @jawache
@jawache
@jawache JS JS JS
Code doesn't block means there is always something that is
running @jawache
@jawache
Node makes it is easy to write performant code @jawache
Async Patterns @jawache
• setInterval(...) • setTimeout(...) • setImmediate(...) • process.nextTick(...) • readFile(...)
Async Patterns @jawache
Event Loop @jawache
@jawache ⏰ ⚠ setInterval setTimeout I/O setImmediate close JS JS
JS
Macro & Micro Tasks @jawache
@jawache ⏰ ⚠ setInterval setTimeout I/O setImmediate close JS JS
JS JS JS process.nextTick Promises
@jawache ⏰ ⚠ setInterval setTimeout I/O setImmediate close JS JS
JS JS JS
Example @jawache
@jawache
@jawache
Summary @jawache
• Node extends and embeds V8 • Non-blocking is better
for performance • Threads or Events • Async Patterns • Event Loop Summary @jawache
@jawache Node.js in the Enterprise Thurs 9am to 4pm Dan
Wahlin John Papa
Asim Hussain @jawache codecraft.tv microsoft.com
Morning Keynote- Everything You Need to Know About Node.js Event
Loop - Bert Belder, IBM https://www.youtube.com/watch?v=PNa9OMajw9w The Node.js Event Loop, Timers, and process.nextTick() https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/ Understanding the Node.js Event Loop https://nodesource.com/blog/understanding-the-nodejs-event-loop/ Understanding the Node.js Event Loop https://blog.risingstack.com/node-js-at-scale-understanding-node-js-event-loop/ Understanding Node.js Event-Driven Architecture https://medium.freecodecamp.org/understanding-node-js-event-driven-architecture-223292fcbc2d V8 https://github.com/v8/v8 Node https://github.com/nodejs/node