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
リクルートテクノロジーズの技術動向
Search
Yosuke Furukawa
PRO
June 30, 2018
Programming
5
3k
リクルートテクノロジーズの技術動向
Java/Go のOB,OG会で発表した リクルートテクノロジーズの技術動向の話です。
Yosuke Furukawa
PRO
June 30, 2018
Tweet
Share
More Decks by Yosuke Furukawa
See All by Yosuke Furukawa
Welcome JSConf.jp 2024
yosuke_furukawa
PRO
1
3.2k
tc39 x jsconf.jp Panel Discussion 2024
yosuke_furukawa
PRO
0
170
Removing Corepack
yosuke_furukawa
PRO
9
1.3k
JavaScript Runtime とはなにか
yosuke_furukawa
PRO
15
2.5k
Strip Types と Storage
yosuke_furukawa
PRO
4
350
Module Harmony について
yosuke_furukawa
PRO
3
1.6k
LTのやり方
yosuke_furukawa
PRO
16
2.2k
AppRouter Panel Talk
yosuke_furukawa
PRO
3
720
Node.js v22 で変わること
yosuke_furukawa
PRO
13
5.4k
Other Decks in Programming
See All in Programming
Criando Commits Incríveis no Git
marcelgsantos
2
170
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
MCP with Cloudflare Workers
yusukebe
2
220
103 Early Hints
sugi_0000
1
220
ドメインイベント増えすぎ問題
h0r15h0
1
100
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
200
talk-with-local-llm-with-web-streams-api
kbaba1001
0
170
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
快速入門可觀測性
blueswen
0
320
return文におけるstd::moveについて
onihusube
1
730
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Designing for humans not robots
tammielis
250
25k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Docker and Python
trallard
41
3.1k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Embracing the Ebb and Flow
colly
84
4.5k
Transcript
ϦΫϧʔτςΫϊϩδʔ ζͷٕज़બఆ 2018/06/30 @ freee גࣜձࣾ / Java/GoݚमOBձ
Twitter: @yosuke_furukawa Github: yosuke-furukawa
2018/11/23 - 24 Node ֶԂࡇ։࠵
JS Quiz
ҎԼͷ݅Λຬͨ͢ a objectΛ ࡞ͬͯΈΔ var a = { // ?
} if ( (a >= 1 && a <= 2) && (a >= 3 && a <= 4) && (a >= 5 && a <= 6) ) { console.log('pass') }
ճ var a = { i: 1, valueOf() { return
this.i++ } } if ( (a >= 1 && a <= 2) && (a >= 3 && a <= 4) && (a >= 5 && a <= 6) ) { console.log('pass') }
ϦΫϧʔτςΫϊϩδʔζͷ ٕज़બఆ
Java Node.js Go ϦΫϧʔτςΫϊϩδʔζͰͬͯΔαʔόα Πυݴޠ Ruby Erlang Clojure Kotlin Python
Java Node.js Go ϦΫϧʔτςΫϊϩδʔζͰͬͯΔαʔόα Πυݴޠ Ruby Erlang Clojure Kotlin Python
ׂͱͨ͘͞Μͷٕज़Λͬͯ ͍Δɻ
ϦΫϧʔτςΫϊϩδʔζͷඪ ४తͳߏ • Backend For Frontends #SPXTFS #'' .JDSP4FSWJDF .JDSP4FSWJDF
.JDSP4FSWJDF
ϦΫϧʔτςΫϊϩδʔζͷඪ ४తͳߏ • Backend For Frontends #SPXTFS #'' .JDSP4FSWJDF .JDSP4FSWJDF
.JDSP4FSWJDF ͜ͷαʔό)5.-Λ࡞ͬ ͨΓɺ"1*Λ·ͱΊͨΓɺηο γϣϯཧͨ͠Γ͢Δ
ϦΫϧʔτςΫϊϩδʔζͷඪ ४తͳߏ • Backend For Frontends #SPXTFS #'' .JDSP4FSWJDF .JDSP4FSWJDF
.JDSP4FSWJDF ͬͪ͜"1*αʔόɺ%#ͱ ଓͨ͠ΓɺpMFॻ͖ग़ͨ͠ Γɺ֎෦"1*ͱܨ͍ͩΓɻ
ͦΕͧΕ͖ɾෆ͖͕͋Δ • BFF • HTMLΛ࡞ΔखલɺϑϩϯτΤϯυΤϯδχ Ξ͕৮Γ͍͢γεςϜͰ͋Δඞཁ͕͋Δ • APIΛͨ͘͞Μ͛ΔͷͰɺඇಉظϑϨϯυ ϦʔͰ͋ͬͯ΄͍͠
ͦΕͧΕ͖ɾෆ͖͕͋Δ • Backend • ϏδωεϩδοΫͱDBΞΫηε͕ଟ͍ • τϥϯβ͘γϣφϧͳॲཧͱ͖ͬͪΓͨ͠ ྫ֎ϋϯυϦϯά • ʢܕ͕΄͍͠ʣ
ϦΫϧʔτςΫϊϩδʔζͷඪ ४తͳߏ • Backend For Frontends #SPXTFS #'' .JDSP4FSWJDF .JDSP4FSWJDF
.JDSP4FSWJDF ͬͪ͜/PEFKTͰॻ͍ͯΔ ͬͪ͜+BWBPS(PͰॻ͍ ͯΔɻ
ϦΫϧʔτςΫϊϩδʔζ • ϑϩϯτΤϯυNode.jsͰॻ͘ • Express, webpack, babel, etc etc •
όοΫΤϯυGo or JavaͰॻ͘ʢঃʑʹGo Λ૿ͯ͠Δ࠷தʣ • echo, DI container, Πϯϑϥܥπʔϧ etc etc
ଟछଟ༷ͳٕज़Λͬͯͷ લʹ͋Δ՝Λղܾ͍ͯ͘͠
GoͰDI container • DI ContainerΛϝϯόʔ͕࡞ͬͯ͘Εͨ ෳͷ+BWBΤϯδχΞʹ(PΛॻ͔ͤΔͨΊɺςετ Λॻ͖͘͢͢ΔͨΊ
PythonͰBig Queryͷςετ πʔϧ • bqspecΛϝϯόʔ͕࡞ͬͯ͘Εͨ • yamlͰsqlͷϦΫΤετͱΓͷνΣοΫΛ ॻ͘͜ͱ͕Ͱ͖Δπʔϧ #JH2VFSZΛॻ͘σʔλΞφϦετͷφϨοδΛς ετͱ͍͏ܗͰܗࣜԽ͢ΔͨΊ
Node.jsͰAPI mock/stub • BFFͱόοΫΤϯυͰAPI௨৴Λstub͢ΔϞ δϡʔϧΛ࡞ͬͯΔ "1*ͷTUVCʹͳΓɺόοΫΤϯυͷαʔόʹς ετΫϥΠΞϯτʹͳΔπʔϧΛ։ൃ
͜͏͍͏ਓΛͬͱ૿ͯ͠ ͍͖͍ͨ͠ɺ͜͏͍͏ࣄྫΛ ͬͱ૿͍ͨ͠
Ͳ͏͍ͯ͠Δ͔
άϧʔϓϚωʔδϟͱͯ͠ҰԠ શ෦Ѳ͢ΔΑ͏ʹ͍ͯ͠Δ • Node.js͚ͩ͡Όͳ͘ɺGoɻ • ୈ6ظ Go ݚम(ϥΠτ൛)डߨੜ • ͪͳΈʹୈNظ
Java ݚमଔۀੜʂʂ
ݚमͱ͍͏ܗͰجૅྗ্Λఏڙ͠ɺ ࣮Ҋ݅ͱ͍͏ܗͰԠ༻ྗ্ͤ͞Δ • ݚमجຊతʹϝϯόʔʹड͚ͤ͞ΔΑ͏ ʹ͍ͯ͠Δ • طʹ2໊ଔۀɺ1໊डߨதɺདྷظ͞Βʹ૿ ͢ɻ • Ҋ݅ͰGoΛ࠾༻͍ͯ͠Δʢ૿ͯ͠Δʣ
ݚमड͚ͯ͠Έͯ • 1ͰJavaݚमड͚ͯͨͱ͖ࢹڱ͔ͬ ͨɻ • ։ൃܦݧΛੵΜͰ͔Βࠓͳࣲ͓ా͞ΜͷGoݚ मΛड͚Δͱ࣭Ͱ͖Δ͜ͱ͕ҧ͏ɻ
ݚमड͚ͯ͠Έͯ
ݚमड͚ͯ͠Έͯ • ܦݧΛੵΜͰ͔Βฉ͚Δ͜ͱ͕૿͑ͯࠓͳ͓ ָ͍͠ɻ • ձࣾʹࣲా͞ΜΛݺΜͰݚमड͚ͤͯ͞Β ͓͏ɻ • ͕ࣗ1Ͱड͚ͨྑ͔ͬͨ͜ͱϝϯόʔ ʹܦݧͯ͠Β͍͍ͨ
ਃ͠༁ఔͷ Node.js࠷৽ಈ
Node.js v10.5.0 released • Worker (Thread)͕ೖͬͨ • Node.js ͜Ε·Ͱsingle thread͕ͩͬͨɺ
Multi Threadϓϩάϥϛϯάग़དྷΔΑ͏ʹ • ࠷ۙNode.jsCPUϔϏʔͳॲཧ͕૿͖͑ͯ ͨ
Node.js has various use cases
Node.js has various use cases &WFSZUPPMTGSBNFXPSLTIBT$16JOUFOTJWFUBTLT
History of concurrent Node.js /PEFKT #FGPSFW 4JOHMF1SPDFTT 4JOHMF5ISFBE
History of concurrent Node.js /PEFKT .BTUFS1SPDFTT $IJME 1SPDFTT $IJME 1SPDFTT
$IJME 1SPDFTT $IJME 1SPDFTT
History of concurrent Node.js /PEFKT .BTUFS1SPDFTT $IJME 1SPDFTT $IJME 1SPDFTT
$IJME 1SPDFTT $IJME 1SPDFTT .BTUFS1SPDFTT DBOGPSLDIJMEQSPDFTT W
History of concurrent Node.js /PEFKT .BTUFS1SPDFTT 8PSLFS 8PSLFS 8PSLFS 8PSLFS
8PSLFS 8PSLFS
History of concurrent Node.js /PEFKT .BTUFS1SPDFTT 8PSLFS 8PSLFS 8PSLFS 8PSLFS
8PSLFS 8PSLFS Ϛελʔϓϩηε͔Β8PSLFS5ISFBEΛىಈ͢ΔɺεϨου ͳͷͰϓϩηεΑΓىಈܰྔɻ
babel-core using single thread. target files (ES6) transpiled code (ES5)
babel-core using child_process .BTUFS target files Send File transpiled
babel-core using Worker /PEFKT .BTUFS target files transpiled Send File
Result pMF OVNCFST CBCFMDPSF VTJOHTJOHMFUISFBE CBCFMDPSF VTJOHDIJMEQSPDFTT CBCFMDPSF VTJOHXPSLFS
NT NT NT NT NT NT NT NT NT NT NT NT NT NT NT
Node.js Worker Λͬͯ৽͠ ͍ϥΠϒϥϦΛ࡞͍ͬͯ͘ • SSRͷߴԽ • babel, webpackͷߴԽ etc
• ϦΫϧʔτςΫϊϩδʔζͰ৽͍ٕ͠ज़Λݚ ڀ՝ͱͯ͠৽͍͠औΓΈΛ͍ͯ͘͠ɻ
Thank you!!