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
Node Boot Camp [under construction]
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
VAN
April 19, 2012
Programming
1
180
Node Boot Camp [under construction]
PGCafe Nite @Mitaka 2012/4/17 (わけあって修正中。特に最後のページ)
VAN
April 19, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
190
CSC307 Lecture 05
javiergs
PRO
0
500
Raku Raku Notion 20260128
hareyakayuruyaka
0
330
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
Oxlintはいいぞ
yug1224
5
1.3k
組織で育むオブザーバビリティ
ryota_hnk
0
180
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
AI & Enginnering
codelynx
0
110
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
55
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
How to make the Groovebox
asonas
2
1.9k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Bash Introduction
62gerente
615
210k
How to Talk to Developers About Accessibility
jct
2
130
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
310
Designing for humans not robots
tammielis
254
26k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Thoughts on Productivity
jonyablonski
74
5k
Transcript
VAN & Jack 12/04/19 1 Node Boot Camp!
ίʔν 12/04/19 Footer Text 2
͜ΕΛಡΊʂ • http://speakerdeck.com/u/badatmath/p/nodejs 12/04/19 Footer Text 3 以上。
ಛ • Single thread • Non-blocking I/O • JavaScript •
V8 12/04/19 Footer Text 4 以上。
ಛ܇ϝχϡʔ • なんでNodeなの? • どんなものなの? • どうやって使うの? 12/04/19 Footer Text
5
എܠ • クライントのスペック向上 • コンテンツのリッチ化 • 情報のリアルタイム化 12/04/19 Footer Text
6
ϦΞϧλΠϜWEB • じわじわと普及 o Google Docs o Twitter o Facebook
12/04/19 Footer Text 7 定量的なデータ
ϦΞϧλΠϜWEB • サーバからデータを送りたい!(PUSH) • ポーリングは非効率だなあ • 常時接続しちゃえ 12/04/19 Footer Text
8
The C10k Problem 12/04/19 Footer Text 9 e.g. Apache
HTTP HTML
The C10k Problem 12/04/19 Footer Text 10 e.g. Apache
Poling Ajax
The C10k Problem 12/04/19 Footer Text 11 Server Thread
Thread Thread e.g. Apache WebSocket SmartPhone
The C10k Problem 12/04/19 Footer Text 12 Server Thread
Thread Thread e.g. Apache WebSocket SmartPhone
The C10k Problem 12/04/19 Footer Text 13 Node.js WebSocket
SmartPhone Server Thread
γϯάϧεϨουͷฐ • 処理待ちが発生 • 複数コア使えない 12/04/19 Footer Text 14
I/Oって遅い CPU コア NW Storage HDD L2キャッシュ Memory L1キャッシュ 3
14 250 41,000,000 240,000,000 = 約地球一周 = 約地球六周 1CPUサイクルを1mとすると
ಛ • Single thread • Non-blocking I/O • JavaScript •
V8 12/04/19 Footer Text 16
JavaScript • 元々非同期処理 • クライアントサイドのリッチ化で流行 • みんな書ける(よね?) 12/04/19 Footer Text
17
γϯάϧϖʔδ ΣϒσβΠϯ 12/04/19 Footer Text 18 HTMLの表示 ビジネスロジック HTMLの構成
HTMLの構成 ビジネスロジック クライアント WEBサーバ Request HTML APIサーバ Request JSON
ߏ 12/04/19 Footer Text 19 Windows にて非同期対応するためにv0.6か ら導入された抽象化レイヤ I/O完了時にコールバック
I/Oのキューを受け付ける 大津さん、 パクリました
ಛ • Single thread • Non-blocking I/O • JavaScript •
V8 12/04/19 Footer Text 20 おさらい
12/04/19 Footer Text 21 それでは Jackコーチによる デモを御覧下さい