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
120
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
73
Tool Belt for JavaScript App Development
dulichan
2
290
Git - simple overview and architecture
dulichan
5
1.8k
Managing Enterprise Mobile Devices and Delivering Enterprise Mobile Applications
dulichan
0
72
Introduction to Jaggery.js
dulichan
0
2k
Other Decks in Programming
See All in Programming
Ruby Function Composition
bkuhlmann
1
340
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
400
見た目から始める生産性向上
ikumatadokoro
10
1.5k
From Spring Boot 2 to Spring Boot 3 with Java 21 and Jakarta EE
ivargrimstad
0
710
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
170
AmperとFleetを使ったAndroidアプリ
yoppie
0
270
AWS CDKコントリビュートTIPS / aws-cdk-contribution-tips
gotok365
4
420
雑に思考を整理する技術と効能
konifar
64
31k
Python3.12のWhat's New から f-string の変更だけ読んでみた
2323code
0
100
Deep Dive into React Stream/Serialize
mugi_uno
3
730
PostmanでAPIの動作確認が楽になった話
h455h1
0
180
Balkan Ruby 2024 — How and why to run SQLite on Rails in production
fractaledmind
0
100
Featured
See All Featured
Building Effective Engineering Teams - LeadDev
addyosmani
32
1.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
123
39k
Fireside Chat
paigeccino
22
2.6k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Facilitating Awesome Meetings
lara
43
5.6k
How to Ace a Technical Interview
jacobian
273
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Optimising Largest Contentful Paint
csswizardry
13
2.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
46k
Happy Clients
brianwarren
92
6.4k
RailsConf 2023
tenderlove
9
560
Building Applications with DynamoDB
mza
88
5.6k
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__