Upgrade to Pro — share decks privately, control downloads, hide ads and more …

リクルートテクノロジーズの技術動向

 リクルートテクノロジーズの技術動向

Java/Go のOB,OG会で発表した リクルートテクノロジーズの技術動向の話です。

D76231a2114896dfcc7b79ac69558b79?s=128

Yosuke Furukawa
PRO

June 30, 2018
Tweet

Transcript

  1. ϦΫϧʔτςΫϊϩδʔ ζͷٕज़બఆ 2018/06/30 @ freee גࣜձࣾ / Java/GoݚमOBձ

  2. Twitter: @yosuke_furukawa Github: yosuke-furukawa

  3. 2018/11/23 - 24 Node ֶԂࡇ։࠵

  4. JS Quiz

  5. ҎԼͷ৚݅Λຬͨ͢ a objectΛ ࡞ͬͯΈΔ var a = { // ?

    } if ( (a >= 1 && a <= 2) && (a >= 3 && a <= 4) && (a >= 5 && a <= 6) ) { console.log('pass') }
  6. ճ౴ var a = { i: 1, valueOf() { return

    this.i++ } } if ( (a >= 1 && a <= 2) && (a >= 3 && a <= 4) && (a >= 5 && a <= 6) ) { console.log('pass') }
  7. ϦΫϧʔτςΫϊϩδʔζͷ ٕज़બఆ

  8. Java Node.js Go ϦΫϧʔτςΫϊϩδʔζͰ࢖ͬͯΔαʔόα Πυݴޠ Ruby Erlang Clojure Kotlin Python

  9. Java Node.js Go ϦΫϧʔτςΫϊϩδʔζͰ࢖ͬͯΔαʔόα Πυݴޠ Ruby Erlang Clojure Kotlin Python

  10. ׂͱͨ͘͞Μͷٕज़Λ࢖ͬͯ ͍Δɻ

  11. ϦΫϧʔτςΫϊϩδʔζͷඪ ४తͳߏ੒ • Backend For Frontends #SPXTFS #'' .JDSP4FSWJDF .JDSP4FSWJDF

    .JDSP4FSWJDF
  12. ϦΫϧʔτςΫϊϩδʔζͷඪ ४తͳߏ੒ • Backend For Frontends #SPXTFS #'' .JDSP4FSWJDF .JDSP4FSWJDF

    .JDSP4FSWJDF ͜ͷαʔό͸)5.-Λ࡞ͬ ͨΓɺ"1*Λ·ͱΊͨΓɺηο γϣϯ؅ཧͨ͠Γ͢Δ
  13. ϦΫϧʔτςΫϊϩδʔζͷඪ ४తͳߏ੒ • Backend For Frontends #SPXTFS #'' .JDSP4FSWJDF .JDSP4FSWJDF

    .JDSP4FSWJDF ͬͪ͜͸"1*αʔόɺ%#ͱ ઀ଓͨ͠ΓɺpMFॻ͖ग़ͨ͠ Γɺ֎෦"1*ͱܨ͍ͩΓɻ
  14. ͦΕͧΕ޲͖ɾෆ޲͖͕͋Δ • BFF • HTMLΛ࡞ΔखલɺϑϩϯτΤϯυΤϯδχ Ξ͕৮Γ΍͍͢γεςϜͰ͋Δඞཁ͕͋Δ • APIΛͨ͘͞Μ౤͛ΔͷͰɺඇಉظϑϨϯυ ϦʔͰ͋ͬͯ΄͍͠

  15. ͦΕͧΕ޲͖ɾෆ޲͖͕͋Δ • Backend • ϏδωεϩδοΫͱDBΞΫηε͕ଟ͍ • τϥϯβ͘γϣφϧͳॲཧͱ͖ͬͪΓͨ͠ ྫ֎ϋϯυϦϯά • ʢܕ͕΄͍͠ʣ

  16. ϦΫϧʔτςΫϊϩδʔζͷඪ ४తͳߏ੒ • Backend For Frontends #SPXTFS #'' .JDSP4FSWJDF .JDSP4FSWJDF

    .JDSP4FSWJDF ͬͪ͜͸/PEFKTͰॻ͍ͯΔ ͬͪ͜͸+BWBPS(PͰॻ͍ ͯΔɻ
  17. ϦΫϧʔτςΫϊϩδʔζ • ϑϩϯτΤϯυ͸Node.jsͰॻ͘ • Express, webpack, babel, etc etc •

    όοΫΤϯυ͸Go or JavaͰॻ͘ʢঃʑʹGo Λ૿΍ͯ͠Δ࠷தʣ • echo, DI container, Πϯϑϥܥπʔϧ etc etc
  18. ଟछଟ༷ͳٕज़Λ࢖ͬͯ໨ͷ લʹ͋Δ՝୊Λղܾ͍ͯ͘͠

  19. GoͰDI container • DI ContainerΛϝϯόʔ͕࡞ͬͯ͘Εͨ ෳ਺ͷ+BWBΤϯδχΞʹ(PΛॻ͔ͤΔͨΊɺςετ Λॻ͖΍͘͢͢ΔͨΊ

  20. PythonͰBig Queryͷςετ πʔϧ • bqspecΛϝϯόʔ͕࡞ͬͯ͘Εͨ • yamlͰsqlͷϦΫΤετͱ໭Γ஋ͷνΣοΫΛ ॻ͘͜ͱ͕Ͱ͖Δπʔϧ #JH2VFSZΛॻ͘σʔλΞφϦετͷφϨοδΛς ετͱ͍͏ܗͰܗࣜԽ͢ΔͨΊ

  21. Node.jsͰAPI mock/stub • BFFͱόοΫΤϯυͰAPI௨৴Λstub͢ΔϞ δϡʔϧΛ࡞ͬͯΔ "1*ͷTUVCʹ΋ͳΓɺόοΫΤϯυͷαʔόʹ͸ς ετΫϥΠΞϯτʹ΋ͳΔπʔϧΛ։ൃ

  22. ͜͏͍͏ਓΛ΋ͬͱ૿΍ͯ͠ ͍͖͍ͨ͠ɺ͜͏͍͏ࣄྫΛ ΋ͬͱ૿΍͍ͨ͠

  23. ๻͸Ͳ͏͍ͯ͠Δ͔

  24. άϧʔϓϚωʔδϟͱͯ͠ҰԠ શ෦೺Ѳ͢ΔΑ͏ʹ͍ͯ͠Δ • Node.js͚ͩ͡Όͳ͘ɺGo΋ɻ • ୈ6ظ Go ݚम(ϥΠτ൛)डߨੜ • ͪͳΈʹୈNظ

    Java ݚमଔۀੜʂʂ
  25. ݚमͱ͍͏ܗͰجૅྗ޲্Λఏڙ͠ɺ ࣮Ҋ݅ͱ͍͏ܗͰԠ༻ྗ޲্ͤ͞Δ • ݚम͸جຊతʹϝϯόʔʹ͸ड͚ͤ͞ΔΑ͏ ʹ͍ͯ͠Δ • طʹ2໊ଔۀɺ1໊डߨதɺདྷظ͸͞Βʹ૿ ΍͢ɻ • Ҋ݅Ͱ΋GoΛ࠾༻͍ͯ͠Δʢ૿΍ͯ͠Δʣ

  26. ݚमड͚௚ͯ͠Έͯ • 1೥໨ͰJavaݚमड͚ͯͨͱ͖͸ࢹ໺΋ڱ͔ͬ ͨɻ • ։ൃܦݧΛੵΜͰ͔Βࠓͳࣲ͓ా͞ΜͷGoݚ मΛड͚Δͱ࣭໰Ͱ͖Δ͜ͱ͕ҧ͏ɻ

  27. ݚमड͚௚ͯ͠Έͯ

  28. ݚमड͚௚ͯ͠Έͯ • ܦݧΛੵΜͰ͔Βฉ͚Δ͜ͱ͕૿͑ͯࠓͳ͓ ָ͍͠ɻ • ձࣾʹࣲా͞ΜΛݺΜͰݚमड͚ͤͯ͞΋Β ͓͏ɻ • ࣗ෼͕1೥໨Ͱड͚ͨྑ͔ͬͨ͜ͱ͸ϝϯόʔ ʹ΋ܦݧͯ͠΋Β͍͍ͨ

  29. ਃ͠༁ఔ౓ͷ Node.js࠷৽ಈ޲

  30. Node.js v10.5.0 released • Worker (Thread)͕ೖͬͨ • Node.js ͸͜Ε·Ͱsingle thread͕ͩͬͨɺ

    Multi Threadϓϩάϥϛϯά΋ग़དྷΔΑ͏ʹ • ࠷ۙ͸Node.js΋CPUϔϏʔͳॲཧ͕૿͖͑ͯ ͨ
  31. Node.js has various use cases

  32. Node.js has various use cases &WFSZUPPMTGSBNFXPSLTIBT$16JOUFOTJWFUBTLT

  33. History of concurrent Node.js /PEFKT #FGPSFW 4JOHMF1SPDFTT 4JOHMF5ISFBE

  34. History of concurrent Node.js /PEFKT .BTUFS1SPDFTT $IJME 1SPDFTT $IJME 1SPDFTT

    $IJME 1SPDFTT $IJME 1SPDFTT
  35. History of concurrent Node.js /PEFKT .BTUFS1SPDFTT $IJME 1SPDFTT $IJME 1SPDFTT

    $IJME 1SPDFTT $IJME 1SPDFTT .BTUFS1SPDFTT DBOGPSLDIJMEQSPDFTT W
  36. History of concurrent Node.js /PEFKT .BTUFS1SPDFTT 8PSLFS 8PSLFS 8PSLFS 8PSLFS

    8PSLFS 8PSLFS
  37. History of concurrent Node.js /PEFKT .BTUFS1SPDFTT 8PSLFS 8PSLFS 8PSLFS 8PSLFS

    8PSLFS 8PSLFS Ϛελʔϓϩηε͔Β8PSLFS5ISFBEΛىಈ͢ΔɺεϨου ͳͷͰϓϩηεΑΓ͸ىಈ͸ܰྔɻ
  38. babel-core using single thread. target files (ES6) transpiled code (ES5)

  39. babel-core using child_process .BTUFS target files Send File transpiled

  40. babel-core using Worker /PEFKT .BTUFS target files transpiled Send File

  41. Result pMF OVNCFST CBCFMDPSF VTJOHTJOHMFUISFBE CBCFMDPSF VTJOHDIJMEQSPDFTT CBCFMDPSF VTJOHXPSLFS 

    NT NT NT  NT NT NT  NT NT NT  NT NT NT  NT NT NT
  42. Node.js Worker Λ࢖ͬͯ৽͠ ͍ϥΠϒϥϦΛ࡞͍ͬͯ͘ • SSRͷߴ଎Խ • babel, webpackͷߴ଎Խ etc

    • ϦΫϧʔτςΫϊϩδʔζͰ͸৽͍ٕ͠ज़Λݚ ڀ՝୊ͱͯ͠৽͍͠औΓ૊ΈΛ͍ͯ͘͠ɻ
  43. Thank you!!