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
Python札幌 LT資料
t3tra
7
1.1k
CSC307 Lecture 05
javiergs
PRO
0
480
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
530
Deno Tunnel を使ってみた話
kamekyame
0
350
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
540
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
130
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
920
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
380
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2.3k
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
940
AIエージェントの設計で注意するべきポイント6選
har1101
6
3.3k
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
5.7k
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Fireside Chat
paigeccino
41
3.8k
From π to Pie charts
rasagy
0
120
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
110
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Rails Girls Zürich Keynote
gr2m
96
14k
Claude Code のすすめ
schroneko
67
210k
30 Presentation Tips
portentint
PRO
1
190
Designing for humans not robots
tammielis
254
26k
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__