Save 37% off PRO during our Black Friday Sale! »

マイクロサービス・アーキテクチャと共存する Ruby on Rails のアーキテクチャ的拡張 - その事例と可能性 / The Architectural Extension of Ruby on Rails to fit to microservices

6115584ec4554ed71f17effd3e0b6988?s=47 Altech
October 23, 2021

マイクロサービス・アーキテクチャと共存する Ruby on Rails のアーキテクチャ的拡張 - その事例と可能性 / The Architectural Extension of Ruby on Rails to fit to microservices

Kaigi on Rails 2021 の発表資料です。
https://kaigionrails.org/2021/talks/Altech_2015/

6115584ec4554ed71f17effd3e0b6988?s=128

Altech

October 23, 2021
Tweet

Transcript

  1. ©2021 Wantedly, Inc. ϚΠΫϩαʔϏεɾΞʔΩςΫνϟ ͱڞଘ͢Δ3VCZPO3BJMTͷ ΞʔΩςΫνϟత֦ு ͦͷࣄྫͱՄೳੑ ,BJHJPO3BJMT4PIFJ5BLFOP

  2. ©2021 Wantedly, Inc. ൃදͷૂ͍ "CTUSBDUΑΓ lۙ೥ɺίϯςφٕज़΍Ϋϥ΢υαʔϏεͷൃలʹΑͬͯɺඞͣ͠΋୯ҰͷϓϩάϥϛϯάݴޠͷΈͰγεςϜΛ ߏ੒͠ͳ͍έʔε΋૿͖͑ͯ·ͨ͠ɻࢲͨͪͷαʔϏεʹ͓͍ͯ΋ɺػցֶशٕज़ͳͲͷಋೖͷඞཁ͔Βɺ೥લ ͔Β3VCZҎ֎ͷݴޠͱڞଘ͍ͯ͘͠ܗͰɺNJDSPTFSWJDFTͷΞʔΩςΫνϟɾελΠϧΛஈ֊తʹಋೖ͖ͯ͠ ·ͨ͠ɻ ͜ͷऔΓ૊ΈͷதͰɺ3VCZPO3BJMTࣗମͷΞʔΩςΫνϟ΋ݟ௚͕͠ඞཁʹͳΓ·ͨ͠ɻྫ͑͹ɺ௨৴ʹ

    H31$Λ࠾༻͢Δ৔߹ɺ)551Λલఏͱͨ͠3BDLͷ࢓૊Έʹ͸৐Δ͜ͱ͕Ͱ͖ͣɺ͕ͨͬͯ͠ίϯτϩʔϥʔ ૚΋࠶ఆٛ͢Δඞཁ͕͋Γ·͢ɻ΄͔ʹ΋"1*εΩʔϚͷಋೖɺ"1*Ϩεϙϯεͷܕ෇͖ͷ૊Έཱͯɺ "DUJWF3FDPSEʹґଘ͠ͳ͍σʔλͷόονϩʔσΟϯάػߏͷಋೖͳͲΛߦ͍ͬͯ·͢ɻ ࠓճͷൃදͰ͸ɺ͜ΕΒͷܦݧΛ౿·͑ͯ୯Ұͷ౷߹γεςϜͱͯ͠ઃܭ͞Εͨ3VCZPO3BJMTΛ1PMZHMPUͳ NJDSPTFSWJDFTʹద߹͍ͤͯ͘͞ʹ͋ͨͬͯɺͲ͏͍ͬͨ՝୊͕Ұൠతʹ͋ΓɺͦΕΛࢲͨͪͷαʔϏεʹ͓͍ ͯ͸ͲͷΑ͏ʹղܾͨ͠ͷ͔Λ͓࿩͠͠·͢ɻಉ͡՝୊Λ͍࣋ͬͯΔํ͸΋ͪΖΜͷ͜ͱɺΞʔΩςΫνϟ֦ுʹ ରͯ͠։͔Ε͍ͯΔͱ͍͏3BJMTͷར఺Λݟ௚͢ػձͱͳΓɺࠓޙͷൃలՄೳੑͷٞ࿦ʹͭͳ͕Ε͹޾͍Ͱ͢ɻz
  3. ©2021 Wantedly, Inc.  ϏδωεɺϓϩμΫτɺιϑτ΢ΣΞ$POUFYU  3BJMTΛNJDSPTFSWJDFTʹద߹ͤ͞Δͱ͍͏͜ͱ1SPCMFN  3BJMTͷΞʔΩςΫνϟΛΞοϓσʔτ͢Δ4PMVUJPO ίϯςϯπ

  4. ©2021 Wantedly, Inc. 4PIFJ5BLFOP 8BOUFEMZ *OD w ϓϩμΫτϚωʔδϟʔˠΞʔΩςΫτ w ৭ʑͳ΋ͷΛ։ൃશମͰ࠷దԽ͢ΔΑ͏ͳ͓࢓ࣄ

    -JLF w ϓϩμΫτ։ൃ w ྑ͍ϓϩμΫτΛ࡞ΕΔಓ۩ɿ3BJMT 4QSFBETIFFU w 🍶ɺ🎮ɺ📚 ࣗݾ঺հ "MUFDI "MUFDI "MUFDI@
  5. ©2021 Wantedly, Inc. ϏδωεɺϓϩμΫτɺιϑτ΢ΣΞ $POUFYU

  6. ๏ਓ޲͚αʔϏε © 2021 Wantedly, Inc. ఏڙϓϩμΫτ SINCE 2020 SINCE 2012

    HIRING ݸਓ޲͚αʔϏε SINCE 2012 SINCE 2016 SINCE 2019 PROFILE ˞υϝΠϯͱͯ͠͸ڧ݁͘߹͓ͯ͠Γɺ 
 දͷΑ͏ʹഉଞతʹ෼͔ΕΔΘ͚Ͱ͸ͳ͍
  7. © 2021 Wantedly, Inc. HOW ʛ ϓϩμΫτ։ൃ / ςΫϊϩδʔ /

    ਓ Applications System Data iOS Platform Web Platform Android Platform Infrastructure: Wantedly Design System Infrastructure : Kubernetes System Cluster • Argo Workflo w generate Gatewa y • GraphQ L Data Warehouse Infrastructure: BigQuery ΞʔΩςΫνϟͱओཁٕज़ • Primary Data 
 src: System • Log Data
 src: System, Applications Raw Data • Protocol Buffers over gRP C • Protocol Buffers over Cloud Pub / Sub Online Communication Offline Communication [Language] TypeScript, Swift, Kotlin [Framework] React, ReactorKit [Language] Ruby, Go, Python [Datastore] Postgres, Redis, Elasticsearch [Machine Leaning] scikit, LightGBM [Observability] Istio, Datadog, NewRelic [Language] SQL [Data Inspector] Looker [Data Collector] fluentd ※ The Ruby logo by Yukihiro Matsumoto (2005) / CC BY-SA 2.5 ※ The Go gopher was designed by Rene French / CC BY 3.0 #Components < 10 #Components < 100 ࠓ೔ͷ͓࿩ ˞ෳ਺ͷ"QQMJDBUJPOʹಉ͡ػೳΛఏڙ͢ΔͨΊɺ 
 υϝΠϯϩδοΫ͸4ZTUFNʹू໿͠"1*Խ
  8. ©2021 Wantedly, Inc. 1. microservices ͸͋͘·ͰΞʔΩςΫνϟɾελΠϧͳͷͰ࢖͍ํ͸৭ʑ 2. ग़དྷΔΑ͏ʹͳΔ͜ͱ͸ଟ͍͕ɺશͯΛ௚ͪʹ΍Βͳ͚Ε͹͍͚ͳ͍Θ͚Ͱ͸ͳ͍ 3. ಘΒΕΔརӹͱίετͷόϥϯεΛݟͳ͕Β΍͍ͬͯΔ

    ͲΜͳNJDSPTFSWJDFTΛ΍͍ͬͯΔ͔ ϓϩάϥϛϯάݴޠʜ1PMZHMPU w 1ZUIPOػցֶशɾਪનશൠ w 3VCZίΞͳυϝΠϯͷ΄ͱΜͲʢϞϊϦεˍ৽نυϝΠϯʣ w (P੹຿͕໌֬ɺ҆ఆੑ΍ϋΠύϑΥʔϚϯε͕ٻΊΒΕΔ΋ͷ̈ ϞϊϦεͷ෼ׂʜඅ༻ରޮՌ͕ߴ͍ɾඞཁʹͳͬͨՕॴ͚ͩ νʔϜͱͷରԠʜ݁Ռͱͯ͠ରԠ͢Δ͜ͱ͸͋Δ ̈8BOUFEMZʹ͓͚Δ(Pಋೖʹ·ͭΘΔٕज़എܠ ϙΠϯτ 30ݸ͘Β͍
  9. ©2021 Wantedly, Inc. 3BJMTΛNJDSPTFSWJDFTʹద߹ͤ͞Δ ͱ͍͏͜ͱ 1SPCMFN

  10. ©2021 Wantedly, Inc.  8FC৘ใγεςϜΛ࡞ΔͨΊͷ౷߹ϑϨʔϜϫʔΫ̈ w 8FC৘ใγεςϜͷྫɿHJUIVCDPN 3BJMTͷ޲͔͍ͬͯΔ՝୊ github.com ̈5IF3BJMT%PDUSJOF

  11. ©2021 Wantedly, Inc.  8FCʜ8PSME8JEF8FCͷུশΠϯλʔϯωοτ 5IF*OUFSOFU   8PSME8JEF8FCʜ৘ใγεςϜ͕ू·ͬͨɺΦʔϓϯͳ෼ࢄγεςϜ w

    ͞·͟·ͳΫϥΠΞϯτɺαʔόʔͳͲ͕ࢀՃͨ͠Γɺ཭୤ͨ͠Γͯ͠ઈ͑ͣมԽ͍ͯ͠Δ w ಈతͳΞʔΩςΫνϟ  3&45ʜΑΓʮྑ͍ʯ8FCͷͨΊͷΞʔΩςΫνϟɾελΠϧ w lݸʑͷz৘ใγεςϜΛ͜͏ઃܭ͢Δͱɺlશମͱͯ͠zՁ஋͕૿͍͑ͯ͘͸ͣɺͱ͍͏ࢹ఺̈ 8FCͷ޲͔͍ͬͯΔ՝୊ 8FCͷߏ଄Λͦͷ··Ұͭͷ৘ใγεςϜΛ࡞ΔͨΊʹ࢖͑ΔͷͰ͸💡 github.com wikipedia.com ̈3F fl FDUJPOTPOUIF3&45BSDIJUFDUVSBMTUZMFBOEQSJODJQMFEEFTJHOPGUIFNPEFSOXFCBSDIJUFDUVSF
  12. ©2021 Wantedly, Inc.  8FC৘ใγεςϜΛ࡞ΔͨΊͷ౷߹ϑϨʔϜϫʔΫ w 8FC৘ใγεςϜͷྫɿHJUIVCDPN  3&45ΞʔΩςΫνϟɾελΠϧͷӨڹΛڧ͘ड͚͍ͯΔ w

    8FCશମͷՁ஋ʹ޲͍͍ͯΔ ➡︎ 3BJMTGPSNJDSPTFSWJDFT w NJDSPTFSWJDFTͱ3&458FCͷߟ͑ํ͸͍ۙ w υϝΠϯͰ෼ׂ͢ΔɺܰྔͳϓϩτίϧΛ࢖༻͢Δʜ̈ w 3BJMTͰNJDSPTFSWJDFTΛ࢝ΊΔ৔߹ɺຆͲͷ΋ͷΛͦͷ··స༻͢Δ͜ͱ͕Ͱ͖Δ w ϦΫΤετɾϨεϙϯεϞσϧɺ+40/ɺϦιʔεࢦ޲ɺɾɾɾ 3BJMTͷ޲͔͍ͬͯΔ՝୊ ̈5IF3BJMT%PDUSJOF ̈.JDSPTFSWJDFT NBSUJOGPXMFSDPN github.com wikipedia.com
  13. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ ©2021 Wantedly, Inc. ΍ͬͨʂ🎉

  14. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ ©2021 Wantedly, Inc. ʁ

  15. ©2021 Wantedly, Inc.  ૉ๿ͳస༻όʔδϣϯ͸ɺͦΕͳΓʹ্ख͘ಈ͍ͯ͘ΕΔ w ˞3BJMT͕͍࣋ͬͯΔ΋ͷΛNJDSPTFSWJDFTʹͦͷ··࣋ͪࠐΉ͜ͱΛɺͱΓ͋͑ͣ͜͜Ͱ͸ʮૉ๿ͳస༻όʔδϣϯʯͱݺͼ·͢ w ߏ଄ͱͯ͠͸େ͖͘ҧΘͳ͍ͨΊɺ8FC͕ಈ͍͍ͯͨͷͱಉ͡ݪཧͰಈ͔ͤΔɻ 

    ߏ଄͸ࣅ͍ͯΔ͕ɺ໨త΍੍໿৚݅͸ҟͳΔ w ୯Ұͷ૊৫WT͋ΒΏΔ૊৫ w ΦʔϓϯWTΫϩʔζυ w ར༻͢Διϑτ΢ΣΞɾϞδϡʔϧͷίϯτϩʔϧՄೳੑ w ʜ ͪΐͬͱཱͪࢭ·ͬͯߟ͑Δ ➡︎ ͜ͷมԽʹରԠ͢Δʮ࠷దԽόʔδϣϯʯΛߟ͑Δ͜ͱ͕Ͱ͖Δ
  16. ©2021 Wantedly, Inc.  "1*Λ࢖ͬͨ౷߹Λ࣮֬ʹ͢Δ༨஍͸ͳ͍͔ʁ  ΑΓޮ཰తͳ௨৴ϓϩτίϧ͸ͳ͍͔ʁ  ಉظͱඇಉظͷτϨʔυΦϑΛબ୒Ͱ͖ΔΑ͏ʹͳΒͳ͍͔ʁ ࠷దԽ͕ߟ͑ΒΕͦ͏ͳτϐοΫ

  17. ©2021 Wantedly, Inc.  ಉ͡૊৫Ͱ͋Ε͹ΑΓڧ͍ΨόφϯεΛෑ͘͜ͱ͕Ͱ͖Δ w ࣗ༝౓ͱޮ཰ੑͷτϨʔυΦϑΛಈ͔ͤΔ  "1* fi

    STUͳ։ൃελΠϧͷಋೖ̈ w "1*ͷεΩʔϚΛઌʹܗࣜతʹهड़ͯ͠ɺ౷߹͢Δ w ྫ͑͹ɺ1SPUPDPM#V ff FST 1SPUPCVG Ͱهड़͢Δ ࠶ߟɿ"1*ఆٛ ̈#FZPOEUIF5XFMWF'BDUPS"QQ
  18. ©2021 Wantedly, Inc.  εΩʔϚఆٛݴޠ݉ɾγϦΞϥΠθʔγϣϯɾϑΥʔϚοτ   σʔλܕΛʮϝοηʔδʯͱ͍͏୯ҐͰهड़ w ϓϩάϥϚʔͳΒ୭Ͱ΋͙͢ʹಡΈॻ͖Ͱ͖ΔΑ͏ͳ୯७ͳߏจΛ͍࣋ͬͯΔ

    ඵͰΘ͔Δ1SPUPDPM#VGGFST ※ Protobuf ͸࢓༷ͱͯ͠ JSON ΁ͷϚοϐϯά΋ఆٛ͞Ε͍ͯΔͨΊɺ
 εΩʔϚͷهड़Λ Protobuf Ͱߦ͍ɺ࣮ࡍʹ΍ΓͱΓ͢ΔγϦΞϥΠ θʔγϣϯɾϑΥʔϚοτ͸ JSONɺͱ͍͏͜ͱ΋Մೳɻ
  19. ©2021 Wantedly, Inc.  NJDSPTFSWJDFTʹ͢Δͱɺ΍ΓͱΓͷ਺͕૿͑ͯϨΠςϯγʔ͕૿େ͕ͪ͠  ࣗ෼ͨͪͷγεςϜͰ͋Ε͹ιϑτ΢ΣΞϞδϡʔϧΛ౷Ұ͢Δ͜ͱ͕Ͱ͖Δ  8FCͷͪΐͬͱઌऔΓΛ͢Δ͜ͱ͕Ͱ͖Δ w

    )551Λར༻͢Δ w )551ΛσʔλసૹϨΠϠʔͱͯ͠׆༻ͨ͠ ɺH31$Λར༻͢Δ ࠶ߟɿ௨৴ϓϩτίϧ ※ gRPC ͸ HTTP2 ͷʮϦΫΤετͷଟॏԽʯʮTCPηογϣϯͷࣗಈ࠶઀ଓʯ ͳͲΛ׆༻͓ͯ͠Γɺޮ཰తͳ௨৴͕Ͱ͖Δ
  20. ©2021 Wantedly, Inc.  )551Ͱ͍͏ΤϯυϙΠϯτΛʮ31$ʯͱ͍͏୯ҐͰهड़ w 3FNPUF1SPDFEVSF$BMMͷུʢωοτϫʔΫӽ͠ͷؔ਺ݺͼग़͠ͱ͍͏ҙຯʣ  w )551ʹΑΔϦΫΤετɾϨεϙϯεϞσϧͱຊ࣭తͳҧ͍͸ͳ͍ʢ˞TUSFBNΛ࢖Θͳ͚Ε͹ʣ

      ෳ਺ͷ31$Λ·ͱΊͨʮ4FSWJDFʯͱ͍͏୯ҐͰهड़ ඵͰΘ͔ΔH31$
  21. ©2021 Wantedly, Inc.  ϦΫΤετɾϨεϙϯεϞσϧ͸ҙ֎ͱ੍໿͕ଟ͍  NJDSPTFSWJDFTͰ͸Ͳ͔͜Ͱ଍ᐫʹͳΔ w ͍ͭ଍ᐫʹͳΔ͔͸ཁٻ΍ಛੑʹΑΔʢҊ֎ઌͩͬͨΓ͢Δʣ w

    ͨͩ͠ɺ଍ᐫʹͳͬͨͱ͖ʹద੾ͳ൑அΛ͢ΔͨΊʹ͸ɺݶքΛೝ͓ࣝͯ͘͠ඞཁ͕͋Δɻ  ผͷํࣜΛซ༻ɿʮඇಉظϝοηʔδϯάʯϞσϧ w Ϩεϙϯε͸ͦ΋ͦ΋ͳ͍ʢඞཁͳΒίʔϧόοΫΛୟ͘ʣ w ௚ͪʹϝοηʔδ͕ॲཧ͞ΕΔ͜ͱ΋ظ଴͠ͳ͍ʢ௨ৗ͸ʣ w ྫ͑͹(PPHMF$MPVE1VC4VCʹ1SPUPCVGϝοηʔδΛ٧ΊͯૹΔ ࠶ߟɿϦΫΤετɾϨεϙϯεϞσϧ
  22. ©2021 Wantedly, Inc.  0OFTIPU w ͢΂ͯͷϦΫΤετ͸ɺͭͷϨεϙϯε͔͠ੜ੒Ͱ͖·ͤΜɻͦͷϨεϙϯεϝοηʔδ͕ Τϥʔʢ·ͨ͸ฆࣦʣʹͳͬͨ৔߹ɺճ෮ϓϩτίϧ͸͋Γ·ͤΜɻ  0OFUPPOF

    w ͢΂ͯͷϦΫΤετ͸ɺͭͷΫϥΠΞϯτ͔Βͭͷαʔόʔ΁ͱਐΈ·͢ɻҰ౓ʹෳ਺ͷά ϧʔϓʹϧʔςΟϯά͢ΔͷͰ͸ͳ͘ɺϓϩΩγͷνΣʔϯ͕ͦΕͧΕʹ౉͠·͢ɻ  0OFXBZ w ͢΂ͯͷϦΫΤετ͸ΫϥΠΞϯτʹΑͬͯ։࢝͞Εͳ͚Ε͹ͳΒͣɺ͢΂ͯͷϨεϙϯε͸ ௚ͪʹੜ੒͞Εͳ͚Ε͹ͳΒͳ͍ͨΊɺαʔόʔ͸ඇಉظͷ௨஌ΛૹΔ͜ͱ͕Ͱ͖·ͤΜɻ ࢀߟɿϦΫΤετɾϨεϙϯεϞσϧͷࡾͭͷݶք̈ 3PZ'JFMEJOHΒʹΑΔݟղ ̈3F fl FDUJPOTPOUIF3&45BSDIJUFDUVSBMTUZMFBOEQSJODJQMFEEFTJHOPGUIFNPEFSOXFCBSDIJUFDUVSF
  23. ©2021 Wantedly, Inc.  "1*εΩʔϚͷಋೖc1SPUPDPM#V ff FST  ϦΫΤετɾϨεϙϯεϞσϧͷ௨৴ϓϩτίϧͷมߋcH31$)551 

    ඇಉظϝοηʔδϯάϞσϧͷ௥Ճc(PPHMF$MPVE1VC4VC ʮ࠷దԽόʔδϣϯʯมߋ·ͱΊ ⚠ ͜Ε͕શ෦ἧΘͳ͍ͱ microservices Λ࢝Ίͯ͸͍͚ͳ͍Θ͚Ͱ͸ͳ͍ʢχʔζʹԠͯ͡ʣ
  24. ©2021 Wantedly, Inc. 3BJMTͷΞʔΩςΫνϟΛΞοϓσʔτ͢Δ 4PMVUJPO

  25. ©2021 Wantedly, Inc. ໰୊ɿʮૉ๿ͳస༻όʔδϣϯʯͱʮ࠷దԽόʔδϣϯʯͷΪϟοϓ ղܾɿσϑΥϧτͷ.7$ΞʔΩςΫνϟΛద੾ʹΞοϓσʔτ͢Δ w 1SPUPDPM#V ff FSTͷಋೖ4DIFNB w

    1C4FSJBMJ[FSͷಋೖ7JFX w H31$4FSWJDFͷಋೖ$POUSPMMFS w H31$*OUFSDFQUPSͷಋೖ.JEEMFXBSF w $PNQVUFE.PEFMͷಋೖ.PEFM w 1VC4VCϝοηʔδϯάͷಋೖ"TZODISPOZ ΍Γ͍ͨ͜ͱ ☑ API εΩʔϚͷಋೖ ☑ ϦΫΤετɾϨεϙϯεϞσϧͷ௨৴ϓϩτίϧͷมߋ ☑ ඇಉظϝοηʔδϯάϞσϧͷ௥Ճ
  26. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ ©2021 Wantedly, Inc. ελʔτ஍఺

  27. ©2021 Wantedly, Inc.  "1*ఆٛΛू໿ͨ͠ϦϙδτϦΛ༻ҙ͍ͯ͠Δɻͦ͜ʹϚʔδ͍ͯ͘͠ɻ  "1*ఆ͔ٛΒ֤ϝοηʔδʹରԠ͢ΔΫϥεΛੜ੒ͯ͠HFNͱͯ͠഑৴  $POUSPMMFSͷதͰ͜ΕΒͷΫϥεΛ࢖ͬͯϨεϙϯεΛ૊ΈཱͯΔ 1SPUPDPM#VGGFSTͷಋೖ

    4DIFNB Ruby ͰͷϝοηʔδΦϒδΣΫτͷ૊Έཱͯ Protocol Buffers ʹΑΔఆٛ 💡 ίϝϯτॻ͘ͷେࣄ
  28. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ ©2021 Wantedly, Inc. ✅ API εΩʔϚͷಋೖ ☑ ϦΫΤετɾϨεϙϯεϞσϧͷ௨৴ϓϩτίϧͷมߋ

    ☑ ඇಉظϝοηʔδϯάϞσϧͷ௥Ճ 7JFXΛऔΓ֎ͯ͠1SPUPCVGఆ͕ٛೖͬͨHFNΛར༻
  29. ©2021 Wantedly, Inc. ݱ࣮తͳྫ ※ Google::Protobuf::StringValue ͸ Protobuf Ͱ͍͏ΦϓγϣφϧܕͷΑ͏ͳ΋ͷʢWell-known types

    ͷ̍ͭʣ %3:͡Όͳ͍ˍָ͘͠ͳ͍
  30. ©2021 Wantedly, Inc. γϦΞϥΠβʔͷಋೖ w ໨తɿυϝΠϯʹ͋ΔϞσϧͷϦιʔεදݱΛฦ͢͜ͱ w ख๏ɿϞσϧΛϦιʔεදݱʹγϦΞϥΠζ͢ΔએݴతͳϞδϡʔϧΛఆٛ͢Δ 1C4FSJBMJ[FSͷಋೖ 7JFX

    XBOUFEMZQCTFSJBMJ[FS 1SPUPCVGͷϝοηʔδΫϥεΛࢦఆ ϥϯλΠϜͰܕ͕֬ఆ͢Δ ͖ͬ͞ͷ৑௕ͳίʔυ͕ফͤΔ ΋Ζ΋ΖͷόϦσʔγϣϯ͕ՄೳʹͳΔ ʢ͍ͣΕ੩తղੳ΋Ͱ͖Δ͔΋ͳ͊ʜ💭ʣ
  31. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ ©2021 Wantedly, Inc. 7JFXʹ૬౰͢Δ෦෼ʹ1SPUPCVG4FSJBMJ[FSΛ௥Ճ

  32. ©2021 Wantedly, Inc. σϑΥϧτͷ3VCZH31$αʔόʔ࣮૷Λར༻ w HSQDTFSWFSHFNىಈίϚϯυɺϩʔυॲཧͳͲ w ىಈɿbundle exec grpc-server

    w ΞϓϦέʔγϣϯίʔυɿapp/grpc_services "DUJPO$POUSPMMFS͔ΒH31$4FSWJDF΁ͷஔ͖׵͑ $POUSPMMFS XBOUFEMZHSQD@TFSWFS
  33. ©2021 Wantedly, Inc. XBOUFEMZSFMPBEFS@JOUFSDFQUPS  3BJMT͸)551αʔόʔΛந৅Խͨ͠3BDLΠϯλʔϑΣΠεͰಈ͍͍ͯΔ w 3BDLͷ࢓૊ΈͷதͰ.JEEMFXBSFͱݺ͹ΕΔϞδϡʔϧ܈͕͞·͟·ͳػೳΛఏڙ͍ͯ͠Δ w ➡︎

    H31$ʹ͢Δͱɺ3BDL.JEEMFXBSF͕શ෦࢖͑ͳ͘ͳΔ  H31$*OUFSDFQUPSͱ͍͏ࣅͨΑ͏ͳ࢓૊Έ͕ଘࡏ͢Δ w ଍Γͳ͍΋ͷ͸࡞Δɻ w ؂ࢹɾϞχλϦϯάɿ w HSQD@OFXSFMJD@JOUFSDFQUPSʜαʔόʔ؂ࢹπʔϧ΁σʔλΛૹΔ w HSQD@PQFODFOTVT@JOUFSDFQUPSʜ෼ࢄτϨʔγϯάͷͨΊͷσʔλΛૹΔ w HSQD@BDDFTT@MPHHJOH@JOUFSDFQUPSʜΞΫηεϩάΛͱΔ w ։ൃମݧɿ w SFMPBEFS@JOUFSDFQUPSʜϑΝΠϧΛมߋ͢ΔͱϦϩʔυ͞ΕΔ 3BDL.JEEMFXBSF͔ΒH31$*OUFSDFQUPS΁ͷஔ͖׵͑ .JEEMFXBSF XBOUFEMZHSQD@BDDFTT@MPHHJOH@JOUFSDFQUPS XBOUFEMZHSQD@PQFODFOTVT@JOUFSDFQUPS XBOUFEMZHSQD@OFXSFMJD@JOUFSDFQUPS ActiveSupport::Reloader Λར༻ Rails.application.config.filter_parameters Λࢀর ActiveSupport::ParameterFilter Λར༻
  34. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ ©2021 Wantedly, Inc. $POUSPMMFSͷ෦෼ΛH31$4FSWJDFͰஔ͖׵͑ɺ 3BDL.JEEMFXBSFΛH31$*OUFSDFQUPSͰஔ͖׵͑ͨ ✅ API εΩʔϚͷಋೖ

    ✅ ϦΫΤετɾϨεϙϯεϞσϧͷ௨৴ϓϩτίϧͷมߋ ☑ ඇಉظϝοηʔδϯάϞσϧͷ௥Ճ
  35. ©2021 Wantedly, Inc. (PPHMF$MPVE1VC4VCͷಋೖ "TZODISPOZ XBOUFEMZHDQDY w HDQDYHFN(PPHMF$MPVE1VC4VC༻ͷΫϥΠΞϯτ w ΞϓϦέʔγϣϯίʔυɿapp/subscribers

  36. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ ©2021 Wantedly, Inc. ඇಉظϝοηʔδΛॲཧ͢ΔΠϯλʔϑΣΠεΛ௥Ճ ✅ API εΩʔϚͷಋೖ ✅

    ϦΫΤετɾϨεϙϯεϞσϧͷ௨৴ϓϩτίϧͷมߋ ✅ ඇಉظϝοηʔδϯάϞσϧͷ௥Ճ Q. ͜ͷύλʔϯͷҧ͍͸ͳΜͩΖ͏ʁ
  37. ©2021 Wantedly, Inc. ʮૉ๿ͳస༻όʔδϣϯʯͱʮ࠷దԽόʔδϣϯʯͷൺֱ ʮ࠷దԽόʔδϣϯʯ w "1* fi STUͳ։ൃϑϩʔʹରԠͯ͠௨৴ٕज़Λ׵͑ͭͭ΋ɺ֓೦తʹ͸ड͚ೖΕ΍͍͢ߏ଄ʹண஍ w

    ඇಉظϝοηʔδΛॲཧ͢ΔΠϯλʔϑΣΠεΛ௥Ճ ➡︎ ͜͜͸·ͩΑΓྑ͍ϑΟοτͷ࢓ํͰݕ౼ͷ༨஍͋Γ
  38. ©2021 Wantedly, Inc. XBOUFEMZDPNQVUFE@NPEFM ิҨɿ"DUJWF3FPDSEͷ෦෼తͳஔ͖׵͑ Ϟσϧʹ૬౰͢Δ෦෼ʹى͜ΔมԽ w ϨεϙϯεͰฦ͢Ϟσϧ͕"DUJWF3FDPSEҎ֎ʹɺଞͷNJDSPTFSWJDFͷσʔλͰ͋Γ͏Δ w "DUJWF3FDPSE͸ɺσʔλιʔεϞσϧఆٛͷରԠؔ܎Λ҉ʹԾఆ͢Δ͜ͱͰɺ

    
 όονϩʔσΟϯάΛ୯७Խ͍ͯ͠ΔʢΊͬͪΌศརʣ ➡︎ ͜ΕΒͷؔ৺Λ෼཭ͨ͠Ϟσϧఆٛͷ࢓ํ͕͋ΔͱҰ෦Ͱ͸ศར w ʢ-5̈Ͱ঺հ͞Εͨʣ$PNQVUFE.PEFM͸͜ͷΑ͏ͳ༻్Ͱ࢖͑Δɻ .PEFM ̈DPNQVUFE@NPEFMͷ঺հ
  39. ©2021 Wantedly, Inc. ·ͱΊ

  40. ©2021 Wantedly, Inc.  3BJMT͓Αͼ8FCͷ޲͔͍ͬͯΔ՝୊Λ֬ೝ͠ɺ 
 NJDSPTFSWJDFTͱڞଘ͢Δ্ͰͷҰൠతͳ໰୊Λ͍͔ͭ͘ڍ͛ͨ  ֤໰୊ʹରͯ͠ɺ͜ΕΛղܾ͢ΔΞʔΩςΫνϟͱίʔυΛఏࣔͨ͠ 

    શମͱͯ͠ɺ3BJMTΛదԠྖҬͷมԽʹԠͯ͡ΞοϓσʔτͰ͖ͨ 
 ➡︎ 3BJMTͷڧΈͱطଘͷࢿ࢈ΛNJDSPTFSWJDFTͷதͰ׆͔ͯ͠ɺ 
 ɹγεςϜશମͱͯ͠ਐԽΛ͍͚ͯ͠ΔΑ͏ͳϦΞʔΩςΫςΟϯάʹͳͬͨ ΍ͬͨ͜ͱ
  41. ©2021 Wantedly, Inc. ؍࡯ͦͷ̍ɿΞʔΩςΫνϟมߋͷաఔͰɺ3BJMTͷιϑτ΢ΣΞతͳߏ଄ʹ્· ΕΔͱ͍͏͜ͱ͸΄ͱΜͲͳ͔ͬͨ w ͜Ε͸ҙਤͯͦ͠͏ઃܭ͍ͯ͠ͳ͚Ε͹ɺͦ͏ͳΒͳ͍ɻ w lେ͖ͳࡿΛ޿͛Δzl1VTIVQBCJHUFOUz͸ࣄ࣮Ͱ͋Γɺ͜ͷར఺͸΋ͬͱೝࣝ͞Εͯྑ͍ ؍࡯ͦͷ̎ɿNJDSPTFSWJDFTͰૺ۰͢Δଟ͘ͷ໰୊͸ɺҰൠతͳղܾʹམͪͨ

    w ΞʔΩςΫνϟʹʮਖ਼ղʯ͸ͳ͍͕ɺʮԦಓʯ͸͋ΔFH3&45ΞʔΩςΫνϟɾελΠϧ w ҰൠԽ͞ΕΔ෦෼ΛϥΠϒϥϦʹ੾Γग़͢͜ͱͰɺ3BJMTͷՄೳੑΛ޿͍͚͛ͯΔ༨஍͸େ͖͍ w ͦΕʹΑͬͯɺϓϩμΫτ΍Ϗδωεɺ૊৫ʹݻ༗ͷʮຊ౰ʹॏཁͳ෦෼ʯͰૣ͘ਐา͍͚ͯ͠ ΔͷͰ͸ͳ͍͔ ࠓճͷऔΓ૊Έͷߟ࡯
  42. ©2021 Wantedly, Inc. Appendix

  43. ©2021 Wantedly, Inc.  1SPUPDPM#V ff FSTؔ࿈ w XBOUFEMZQCTFSJBMJ[FS 

    H31$ؔ࿈ w XBOUFEMZHSQDTFSWFS w XBOUFEMZHSQD@OFXSFMJD@JOUFSDFQUPS w XBOUFEMZHSQD@PQFODFOTVT@JOUFSDFQUPS w XBOUFEMZHSQD@BDDFTT@MPHHJOH@JOUFSDFQUPS w XBOUFEMZSFMPBEFS@JOUFSDFQUPS  (PPHMF$MPVE1VC4VCؔ࿈ w XBOUFEMZHDQDY ؔ࿈ϥΠϒϥϦ  ൚༻ w XBOUFEMZDPNQVUFE@NPEFM
  44. ©2021 Wantedly, Inc. w 5IF3BJMT%PDUSJOF %BWJE)FJOFNFJFS)BOTTPO   w IUUQTSVCZPOSBJMTPSHEPDUSJOF

    w IUUQTRJJUBDPNUBLBIBTIJNJUFNTE ff FFDCEBD .BTBZPTIJ5BLBIBTIJ   w 3F fl FDUJPOTPOUIF3&45BSDIJUFDUVSBMTUZMFBOEQSJODJQMFEEFTJHOPGUIFNPEFSOXFC BSDIJUFDUVSFz 3PZ'JFMEJOH   w IUUQTEMBDNPSHEPJ w .JDSPTFSWJDFT .BSUJO'PXMFS   w IUUQTNBSUJOGPXMFSDPNBSUJDMFTNJDSPTFSWJDFTIUNM w #FZPOEUIF5XFMWF'BDUPS"QQ "EBN#MPPN   w IUUQTUBO[VWNXBSFDPNDPOUFOUCMPHCFZPOEUIFUXFMWFGBDUPSBQQ w 8BOUFEMZʹ͓͚Δ(Pಋೖʹ·ͭΘΔٕज़എܠ 4PIFJ5BLFOP   w IUUQTXXXXBOUFEMZDPNDPNQBOJFTXBOUFEMZQPTU@BSUJDMFT w DPNQVUFE@NPEFMͷ঺հ*OUSPEVDJOHDPNQVUFE@NPEFM .BTBLJ)BSB   w IUUQTTQFBLFSEFDLDPNROJHIZJOUSPEVDJOHDPNQVUFENPEFM ࢀߟจݙɾؔ࿈ϦϯΫ