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
130
0
Share
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
More Decks by Dulitha Wijewantha (Chan)
See All by Dulitha Wijewantha (Chan)
Spark in Action - Overview
dulichan
0
84
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
79
Introduction to Jaggery.js
dulichan
0
2k
Other Decks in Programming
See All in Programming
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
150
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
3
920
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
280
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
360
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
150
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
210
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
400
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
440
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.2k
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
180
Making the RBS Parser Faster
soutaro
0
710
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1.1k
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3k
Building AI with AI
inesmontani
PRO
1
990
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
530
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
120
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Rails Girls Zürich Keynote
gr2m
96
14k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
550
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
390
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
44k
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__