Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
80
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
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
390
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
170
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
2.6k
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
170
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
3.6k
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
7.2k
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
120
tparseでgo testの出力を見やすくする
utgwkk
2
220
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
270
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
310
dotfiles 式年遷宮 令和最新版
masawada
1
770
愛される翻訳の秘訣
kishikawakatsumi
3
330
Featured
See All Featured
Writing Fast Ruby
sferik
630
62k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
100
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Navigating Team Friction
lara
191
16k
Code Review Best Practice
trishagee
74
19k
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__