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
Non-blocking IO & Event Loop
Search
Dulitha Wijewantha (Chan)
August 12, 2013
Programming
0
130
Non-blocking IO & Event Loop
How Node.js handles concurrency (by supporting non-blocking IO) using an Event Loop.
Dulitha Wijewantha (Chan)
August 12, 2013
Tweet
Share
More Decks by Dulitha Wijewantha (Chan)
See All by Dulitha Wijewantha (Chan)
Spark in Action - Overview
dulichan
0
81
Tool Belt for JavaScript App Development
dulichan
2
300
Git - simple overview and architecture
dulichan
5
1.9k
Managing Enterprise Mobile Devices and Delivering Enterprise Mobile Applications
dulichan
0
77
Introduction to Jaggery.js
dulichan
0
2k
Other Decks in Programming
See All in Programming
SourceGeneratorのススメ
htkym
0
200
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
Fluid Templating in TYPO3 14
s2b
0
130
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
270
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
CSC307 Lecture 03
javiergs
PRO
1
490
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
140
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
940
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
110
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
430
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
Balancing Empowerment & Direction
lara
5
890
WCS-LA-2024
lcolladotor
0
450
The Curious Case for Waylosing
cassininazir
0
240
The agentic SEO stack - context over prompts
schlessera
0
640
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
200
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Transcript
non-blocking IO,
How to handle concurrency?
Start a new thread per each client
That sort things out right? Now you can rest easy
__Truth__
How do we perform computation?
=>Synchronous =>Fork a new process =>Threads
__Classic Example__ Kottu Joint
New Type of Kottu Joint
Event based Kottu Joint
So how is this implemented in Node?
Callbacks ^_^
app.router.get('/page/viewProject', function () { var response = this.res; var request
= this.req; var projectid = url.parse(request.url, true).query.projectid; dataModel.Project.findOne({_id:projectid}, function(err,project){ app.render("viewProject", project, function(result){ response.writeHead(200, { 'Content-Type': 'text/html' }); response.end(result); }); });});
Single threaded solution
Why JavaScript?
JavaScript is by default an event based language. It’s support
for callbacks is an excellent reason for choosing JavaScript to implement Node.js
__Details of implementation__ libuv
__Fini__