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
Removing Corepack
yosuke_furukawa
PRO
9
1.2k
JavaScript Runtime とはなにか
yosuke_furukawa
PRO
15
2.4k
Strip Types と Storage
yosuke_furukawa
PRO
4
320
Module Harmony について
yosuke_furukawa
PRO
3
1.5k
LTのやり方
yosuke_furukawa
PRO
16
2.1k
AppRouter Panel Talk
yosuke_furukawa
PRO
3
670
Node.js v22 で変わること
yosuke_furukawa
PRO
13
5.1k
リアーキテクトと開発生産性について
yosuke_furukawa
PRO
25
9.4k
JavaScript Server Runtime History
yosuke_furukawa
PRO
9
3.7k
Other Decks in Programming
See All in Programming
UnJSで簡単に始めるCLIツール開発 / cli-tool-development-with-unjs
aoseyuu
2
330
GrafanaのHTTP API を眺めてみよう
rinchoku
0
330
Kotlin Multiplatform at Stable and Beyond (Kotlin Vienna, October 2024)
zsmb
2
380
CSC509 Lecture 03
javiergs
PRO
0
140
Quarto Clean Theme
nicetak
0
220
Scan with Decoupled Look-back and Onesweep Radix Sort
shocker_0x15
0
120
Subclassing, Composition, Python, and You
hynek
3
180
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
0
190
実践Dash - 手を抜きながら本気で作るデータApplicationの基本と応用 / Dash for Python and Baseball
shinyorke
2
630
Progressive Web Apps for Rails developers
siaw23
2
560
Новый уровень ML-персонализации Lamoda: Как мы усилили ее в каталоге и перенесли на другие продукты
lamodatech
0
230
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
190
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
43
5.9k
Rails Girls Zürich Keynote
gr2m
93
13k
Making Projects Easy
brettharned
115
5.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
25
660
Building Your Own Lightsaber
phodgson
102
6k
Adopting Sorbet at Scale
ufuk
73
9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Practical Orchestrator
shlominoach
186
10k
Happy Clients
brianwarren
97
6.7k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Automating Front-end Workflow
addyosmani
1365
200k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
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!!