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
tc39 x jsconf.jp Panel Discussion 2024
yosuke_furukawa
PRO
0
150
Removing Corepack
yosuke_furukawa
PRO
9
1.3k
JavaScript Runtime とはなにか
yosuke_furukawa
PRO
15
2.5k
Strip Types と Storage
yosuke_furukawa
PRO
4
340
Module Harmony について
yosuke_furukawa
PRO
3
1.5k
LTのやり方
yosuke_furukawa
PRO
16
2.2k
AppRouter Panel Talk
yosuke_furukawa
PRO
3
700
Node.js v22 で変わること
yosuke_furukawa
PRO
13
5.3k
リアーキテクトと開発生産性について
yosuke_furukawa
PRO
25
9.6k
Other Decks in Programming
See All in Programming
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
250
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
280
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
RubyLSPのマルチバイト文字対応
notfounds
0
120
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
CSC509 Lecture 09
javiergs
PRO
0
140
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Building an army of robots
kneath
302
43k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Visualization
eitanlees
145
15k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The Cult of Friendly URLs
andyhume
78
6k
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!!