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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Asim Hussain
March 26, 2018
Programming
1
190
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
87
YGLF_2019.pdf
jawache
1
160
AI + JavaScript Rocks @ GDGDevFest UA 2018
jawache
0
62
How to hack a web app? WebConfAsia 2018
jawache
0
98
How to scale an SPA? @ AmsterdamJS 2018
jawache
0
37
How to hack an Angular app? - ngConf 2018
jawache
0
1k
How to hack an Angular app? @ ngVikings 2018
jawache
1
1.1k
How to hack a python app? @ PyCaribbean 2018
jawache
0
190
Other Decks in Programming
See All in Programming
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
170
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
190
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.4k
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
150
Codex の「自走力」を高める
yorifuji
0
1.3k
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
240
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
190
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
120
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
飯MCP
yusukebe
0
410
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
160
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
190
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
94
How to Ace a Technical Interview
jacobian
281
24k
Tell your own story through comics
letsgokoyo
1
870
Google's AI Overviews - The New Search
badams
0
950
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Leo the Paperboy
mayatellez
5
1.6k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
320
Accessibility Awareness
sabderemane
0
87
How GitHub (no longer) Works
holman
316
150k
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