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
VAN
April 19, 2012
Programming
1
170
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
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
350
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
210
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
Domain-Driven Transformation
hschwentner
2
1.9k
仕様変更に耐えるための"今の"DRY原則を考える / Rethinking the "Don't repeat yourself" for resilience to specification changes
mkmk884
0
190
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
370
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
140
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
600
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
200
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.3k
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Being A Developer After 40
akosma
89
590k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
A Tale of Four Properties
chriscoyier
158
23k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
A better future with KSS
kneath
238
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
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コーチによる デモを御覧下さい