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
170
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
880
Saving the world, one line at a time [CodeLeaders Australia 2019]
jawache
0
70
YGLF_2019.pdf
jawache
1
130
AI + JavaScript Rocks @ GDGDevFest UA 2018
jawache
0
47
How to hack a web app? WebConfAsia 2018
jawache
0
82
How to scale an SPA? @ AmsterdamJS 2018
jawache
0
24
How to hack an Angular app? - ngConf 2018
jawache
0
910
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
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
680
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
240
読まないコードリーディング術
hisaju
0
110
LINE messaging APIを使ってGoogleカレンダーと連携した予約ツールを作ってみた
takumakoike
0
120
Djangoにおける複数ユーザー種別認証の設計アプローチ@DjangoCongress JP 2025
delhi09
PRO
4
490
2025.2.14_Developers Summit 2025_登壇資料
0101unite
0
210
Datadog Workflow Automation で圧倒的価値提供
showwin
1
260
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
110
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
160
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
940
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
210
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.4k
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
How GitHub (no longer) Works
holman
314
140k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Navigating Team Friction
lara
183
15k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Building Applications with DynamoDB
mza
93
6.2k
Designing Experiences People Love
moore
140
23k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
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