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
140
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
95
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
80
Introduction to Jaggery.js
dulichan
0
2k
Other Decks in Programming
See All in Programming
Oxlintのカスタムルールの現況
syumai
5
980
関係性から理解する"同一性"の型用語たち
pvcresin
2
630
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
710
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
130
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
140
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
2k
初めてのRubyKaigiはこう見えた
jellyfish700
0
410
エージェンティックRAGにAWSで入門しよう!
har1101
4
110
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
550
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.1k
GitHub Copilot CLIのいいところ
htkym
2
1.2k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.5k
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
41
2.5k
Music & Morning Musume
bryan
47
7.2k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
220
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
220
Faster Mobile Websites
deanohume
310
31k
Leo the Paperboy
mayatellez
7
1.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
HDC tutorial
michielstock
2
690
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
530
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
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__