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
もう少しテストを書きたいんじゃ〜 #phpstudy
o0h
PRO
18
4.1k
AIプログラミング雑キャッチアップ
yuheinakasaka
19
4.7k
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
280
Domain-Driven Design (Tutorial)
hschwentner
13
22k
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
210
LINE messaging APIを使ってGoogleカレンダーと連携した予約ツールを作ってみた
takumakoike
0
120
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
170
color-scheme: light dark; を完全に理解する
uhyo
7
500
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
260
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
190
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
250
GoとPHPのインターフェイスの違い
shimabox
2
210
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
A better future with KSS
kneath
238
17k
The Cult of Friendly URLs
andyhume
78
6.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Designing for Performance
lara
604
68k
Building Your Own Lightsaber
phodgson
104
6.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
100
18k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
1k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
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コーチによる デモを御覧下さい