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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
910
Saving the world, one line at a time [CodeLeaders Australia 2019]
jawache
0
86
YGLF_2019.pdf
jawache
1
150
AI + JavaScript Rocks @ GDGDevFest UA 2018
jawache
0
61
How to hack a web app? WebConfAsia 2018
jawache
0
95
How to scale an SPA? @ AmsterdamJS 2018
jawache
0
34
How to hack an Angular app? - ngConf 2018
jawache
0
990
How to hack an Angular app? @ ngVikings 2018
jawache
1
1.1k
How to hack a python app? @ PyCaribbean 2018
jawache
0
180
Other Decks in Programming
See All in Programming
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
190
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
500
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
150
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
260
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.8k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
550
AtCoder Conference 2025
shindannin
0
1k
CSC307 Lecture 07
javiergs
PRO
0
520
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
130
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
520
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
61
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
86
Tell your own story through comics
letsgokoyo
1
800
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
63
Game over? The fight for quality and originality in the time of robots
wayneb77
1
89
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