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
80
Tool Belt for JavaScript App Development
dulichan
2
300
Git - simple overview and architecture
dulichan
5
1.8k
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
Go言語の特性を活かした公式MCP SDKの設計
hond0413
2
500
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
360
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
140
What's new in Spring Modulith?
olivergierke
1
170
品質ワークショップをやってみた
nealle
0
630
Developer Joy - The New Paradigm
hollycummins
1
360
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
1
130
Webサーバーサイド言語としてのRustについて
kouyuume
1
4.9k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
470
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
140
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.5k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
233
18k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Code Review Best Practice
trishagee
72
19k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
How to Think Like a Performance Engineer
csswizardry
27
2.1k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Statistics for Hackers
jakevdp
799
220k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
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__