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
stubcell
Search
Yosuke Furukawa
PRO
May 10, 2014
Programming
0
2.9k
stubcell
Yosuke Furukawa
PRO
May 10, 2014
Tweet
Share
More Decks by Yosuke Furukawa
See All by Yosuke Furukawa
tc39 x jsconf.jp Panel Discussion 2024
yosuke_furukawa
PRO
0
140
Removing Corepack
yosuke_furukawa
PRO
9
1.2k
JavaScript Runtime とはなにか
yosuke_furukawa
PRO
15
2.4k
Strip Types と Storage
yosuke_furukawa
PRO
4
330
Module Harmony について
yosuke_furukawa
PRO
3
1.5k
LTのやり方
yosuke_furukawa
PRO
16
2.1k
AppRouter Panel Talk
yosuke_furukawa
PRO
3
700
Node.js v22 で変わること
yosuke_furukawa
PRO
13
5.2k
リアーキテクトと開発生産性について
yosuke_furukawa
PRO
25
9.6k
Other Decks in Programming
See All in Programming
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
17
4.3k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
310
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
580
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
2
830
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
4
520
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
190
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
300
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.2k
RailsのPull requestsのレビューの時に私が考えていること
yahonda
5
2.7k
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
770
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
470
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
49
11k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Designing for humans not robots
tammielis
249
25k
Visualization
eitanlees
145
15k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Building an army of robots
kneath
302
42k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Measuring & Analyzing Core Web Vitals
bluesmoon
2
71
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Transcript
νʔϜ։ൃʹཱͭstubcell @yosuke_furukawa
@yosuke_furukawa Node.jsϢʔβʔάϧʔϓද / DeNAॴଐ
CodeGrid ೋप ͓ΊͰͱ͏͍͟͝·͢!!!!
ฐࣾνʔϜ։ൃελΠϧ client side API server (websocket) Request Response Request Response
websocket
ฐࣾνʔϜ։ൃελΠϧ client side API server websocket Request Response Request Response
websocket େମҰਓ Ұͭड͚࣋ͭ ֻ͚࣋ͭ࣌͋Δ͕ɺ αʔόʔͱϑϩϯτ جຊతʹ͔ΕͯΔ
ฐࣾνʔϜ։ൃελΠϧ client side API server websocket Request Response Request Response
websocket ϦΫΤετ͕ظͱҧ͏ "1*ΤϯυϙΠϯτ͕ແ ͍͔Βಈ࡞֬ೝͰ͖ͳ͍ "1*ͷ༷ɺ͜ͷલܾΊ ͳ͔͚ͬͨͬ
Problem ! client, websocket୯ମͰಈ࡞֬ೝ͠ʹ͍͘ APIͷexpect/actual͕ҧ͏͕࣌͋Δ APIࡦఆͷίϛϡχέʔγϣϯίετ૿
Ϟδϡʔϧؒૄ݁߹ɺ ͦͷίϛϡχέʔγϣϯ ີ݁߹ͷํ͕ྑ͍ɻ
ͦ͜Ͱɺstubcell https://github.com/yosuke- furukawa/stubcell
Stubcell ສೳࡉ๔(STAP)ͷΑ͏ʹ֤छϞδϡʔϧؒͰStubΛ࡞ΕΔ JSON5Խ͞Ε͓ͯΓɺJSON͕human friendlyὑ grunt, gulpԽ͞Ε͓ͯΓɺλεΫϥϯφʔͱͷੑߴ͍
ฐࣾνʔϜ։ൃελΠϧ client side API server websocket Request Response Request Response
websocket ϦΫΤετ͕ظͱҧ͏ "1*ΤϯυϙΠϯτ͕ແ ͍͔Βಈ࡞֬ೝͰ͖ͳ͍ "1*ͷ༷ɺ͜ͷલܾΊ ͳ͔͚ͬͨͬ ͜͏ͩͬͨͷ͕ɻɻɻ
ฐࣾνʔϜ։ൃελΠϧ client side API server websocket Request Response Request Response
websocket 4UVCͷఆٛϑΝΠϧΛ ಡΊϦΫΤετͷظ͢ Δ͕͔Δὑ 4UVCDFMMͰ αʔόϨε։ൃὑ "1*ͷ༷͕4UVCͷఆٛϑΝ Πϧͱͯͬͯ͠Δὑ ͜͏ͳΔ ΈΜͳϋοϐʔὑ
DEMO
౦ژNodeֶԂͷαΠτ ࡞·͓ͨئ͍͠·͢ m(_ _)m Thanks :D