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
83
Tool Belt for JavaScript App Development
dulichan
2
310
Git - simple overview and architecture
dulichan
5
1.9k
Managing Enterprise Mobile Devices and Delivering Enterprise Mobile Applications
dulichan
0
78
Introduction to Jaggery.js
dulichan
0
2k
Other Decks in Programming
See All in Programming
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
240
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.3k
存在論的プログラミング: 時間と存在を記述する
koriym
4
460
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
200
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
390
実践ハーネスエンジニアリング #MOSHTech
kajitack
6
2.8k
Claude Code Skill入門
mayahoney
0
420
AI活用のコスパを最大化する方法
ochtum
0
310
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
150
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.7k
Feature Toggle は捨てやすく使おう
gennei
0
320
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
510
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
300
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Facilitating Awesome Meetings
lara
57
6.8k
Writing Fast Ruby
sferik
630
63k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
Chasing Engaging Ingredients in Design
codingconduct
0
150
Practical Orchestrator
shlominoach
191
11k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
240
How to Talk to Developers About Accessibility
jct
2
160
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
220
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__