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
79
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
75
Introduction to Jaggery.js
dulichan
0
2k
Other Decks in Programming
See All in Programming
AIのメモリー
watany
12
1.2k
「次に何を学べばいいか分からない」あなたへ──若手エンジニアのための学習地図
panda_program
3
690
ZeroETLで始めるDynamoDBとS3の連携
afooooil
0
140
PHPUnitの限界をPlaywrightで補完するテストアプローチ
yuzneri
0
360
Quality Gates in the Age of Agentic Coding
helmedeiros
PRO
1
120
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
2
1.2k
Dart 参戦!!静的型付き言語界の隠れた実力者
kno3a87
0
120
kiroでゲームを作ってみた
iriikeita
0
120
React は次の10年を生き残れるか:3つのトレンドから考える
oukayuka
41
16k
What's new in Adaptive Android development
fornewid
0
130
PHPカンファレンス関西2025 基調講演
sugimotokei
6
1k
Comparing decimals in Swift Testing
417_72ki
0
150
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
54
11k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
How STYLIGHT went responsive
nonsquared
100
5.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
Writing Fast Ruby
sferik
628
62k
Faster Mobile Websites
deanohume
308
31k
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__