マイクロサービスの思想から捉える Backends for Frontendsとその類似パターン / Backends for Frontends and its similar pattern from the microservices perspective

942bb606679caf4c57b38927f83178e1?s=47 qsona
June 07, 2018

マイクロサービスの思想から捉える Backends for Frontendsとその類似パターン / Backends for Frontends and its similar pattern from the microservices perspective

UIT#3 The “Backends for Frontends” sharing

942bb606679caf4c57b38927f83178e1?s=128

qsona

June 07, 2018
Tweet

Transcript

  1. ϚΠΫϩαʔϏεͷࢥ૝͔Βଊ͑Δ #BDLFOETGPS'SPOUFOETͱͦͷྨࣅύλʔϯ ৿ٱଠ࿠!RTPOB גࣜձࣾ'J/$ 6*55IFl#BDLFOETGPS'SPOUFOETzTIBSJOH

  2. ࣗݾ঺հ 2 • ໊લ৿ٱଠ࿠ !RTPOB  • גࣜձࣾ'J/$ • ओʹαʔόαΠυΤϯδχΞ

    ͓खॊΒ͔ʹʂ  • #''ྺ೥൒ ʙ  • .JDSPTFSWJDFT.FFUVQओ࠵
  3. ΞδΣϯμ 3 ‣ ষ#''ͱ͸ɺͦͷҐஔ͚ͮͱ໨త ‣ ষ#''ͱϚΠΫϩαʔϏεͷؔ܎ੑ ‣ ষ#''ͱͦͷྨࣅύλʔϯͷ࣮ફ

  4. ΞδΣϯμ 4 ▾ ষ#''ͱ͸ɺͦͷҐஔ͚ͮͱ໨త ‣ #''ͱ͸ʁ ‣ #''ͷཱͪҐஔ ‣ #''ͷ໨తɾղܾ͢Δ՝୊

    ‣ ষ#''ͱϚΠΫϩαʔϏεͷؔ܎ੑ ‣ ষ#''ͱͦͷྨࣅύλʔϯͷ࣮ફ
  5. #''ͱ͸ʁ 5 • ࢲݟ#'' #BDLFOETGPS'SPOUFOET ʹ͸
 গ͠༻ޠͷࠞཚ͕͋ΔΑ͏ʹࢥ͏ • ʮ4FSWFSTGPS'SPOUFOETʯ͕ΑΓ࣮ଶʹ͍ۙ •

    'SPOUFOE#BDLFOE࿦ཧతͳ෼ྨ • $MJFOU4FSWFS෺ཧతͳ෼ྨ
  6. #''ͷཱͪҐஔ 6 • ࿦ཧత͸'SPOUFOEʹҐஔ͠ɺ෺ཧతʹ͸4FSWFSͰ͋Δ

  7. #''ͷ໨తɾղܾ͢Δ՝୊ 7 • ϚΠΫϩαʔϏεͷ"1*܈Λɺ6*޲͚ʹ߹੒͢Δ • ͜ͷൃදͰ͸͜ΕΛ۷ΓԼ͛Δ • ͦͷଞʹ΋͍Ζ͍Ζ͋Δ • Ωϟογϡ

    6*ϨΠϠͷ"#ςετ FUD • ࠓ೔͸͍ΖΜͳࣄྫ͕ݟΕΔ͸ͣʂ
  8. ΞδΣϯμ 8 ‣ ষ#''ͱ͸ɺͦͷҐஔ͚ͮͱ໨త ▾ ষ#''ͱϚΠΫϩαʔϏεͷؔ܎ੑ ‣ ϚΠΫϩαʔϏεͱ͸ʁ ‣ ΫϥΠΞϯτͱϚΠΫϩαʔϏεͷؔ܎

    ‣ ϚΠΫϩαʔϏεͷ౷߹ͷํ๏ ‣ ষ#''ͱͦͷྨࣅύλʔϯͷ࣮ફ
  9. ϚΠΫϩαʔϏεͱ͸ʁ 9 • ڠௐͯ͠ಈ࡞͢Δɺখن໛Ͱࣗ཯తͳαʔϏε • ֤ϏδωεΛ୲౰͢ΔνʔϜ͕ɺಠཱʹϦϦʔεαΠΫ ϧΛ࣋ͪɺߴ଎ʹ1%$"Λճ͢͜ͱ͕Ͱ͖Δ • 'J/$ͷαʔϏεΛྫʹͱͬͯઆ໌͢Δ •

    'J/$͸໿ݸͷϚΠΫϩαʔϏεΛӡ༻த
  10. 10 'J/$ͷϓϩμΫτ ʙϔϧεέΞɾඒ༰ʹಛԽͨ͠&$αΠτʙ Ҩ఻ࢠ৘ใ ݂ӷݕࠪ݁Ռ ݈਍σʔλ νϟοτ ໰͍߹Θͤ ߪങཤྺ ޿ࠂ৘ใ౳

    ϩάΠϯ࣌ؒ ར༻ස౓ ੜମ৘ใɾ׆ಈσʔλ ҩྍɾݕࠪσʔλ ߦಈཤྺ ͓೰Έ า਺ɾ׆ಈྔ ݂ѹ ମௐɾؾ෼ ৯ࣄ࣌ؒɾ಺༰ ਭ຾ɾब৸࣌ؒ ମॏɾମ૊੒ ੜཧ ੜ׆श׳ ʙϨγϐϑΟοτωεϥΠϑϋοΫ౳ͷಈըίϯςϯ πʙ ࢟੎ ʙ'J/$๏ਓɾ݈อ޲͚΢ΣϧωειϦϡʔγϣϯʙ
  11. 'J/$ͷϓϩμΫτͱϚΠΫϩαʔϏε 11 • ֤ϓϩμΫτ͕ɺߋʹ༷ʑͳػೳΛ಺แ͍ͯ͠Δ • ྫ'J/$ΞϓϦ • ϥΠϑϩά า਺ ਭ຾

    FUD  • ϑΟοτωεத৺ͷಈըϝσΟΞ • ίϛϡχςΟػೳ • QVTI௨஌ ΦϯϘʔσΟϯά ͳͲ • ֤ػೳ͸૬ޓʹ࿈ܞ͍ͯ͠Δ • ྫา͘ͱϙΠϯτ͕΋Β͑Δ'J/$ϞʔϧͰ࢖͑Δ • "1*࿈ܞඇಉظΠϕϯτ࿈ܞ
  12. 'J/$ͷϓϩμΫτͱϚΠΫϩαʔϏε 12 • ֤ػೳ͸ɺಠཱͯ͠େ͖ͳϏδωεʹҭ͍ͯͨ • 'J/$ͷϓϩμΫτͷػೳʹ͸ɺ୯ମͰ΋ࣄۀʹͳΓ͏Δ΋ ͷ͕ͨ͘͞Μ͋Δ • ͦΕΒΛಠཱͯ͠αʔϏεʹ੾Γग़͢͜ͱͰɺνʔϜ͕ ࣗ཯ɾಠཱͯ͠։ൃϦϦʔεαΠΫϧΛճ͠ɺߴ଎ʹ

    1%$"͢Δ͜ͱ͕Ͱ͖Δ
  13. • ϞϊϦγοΫαʔϏεͷ৔߹ • ΫϥΠΞϯτOαʔϏε ΫϥΠΞϯτͱαʔϏεͷؔ܎ 13

  14. • ϚΠΫϩαʔϏεͷ৔߹ • ΫϥΠΞϯτONαʔϏε ΫϥΠΞϯτͱαʔϏεͷؔ܎ 14

  15. • ͜ͷਤͷΑ͏ʹɺ௚઀΍ΓͱΓ͢ΔͱͲ͏ͳΔ͔ʁ ϚΠΫϩαʔϏεͷ౷߹ͷํ๏ 15

  16.  ௚઀΍ΓͱΓ͢Δ 16 • ໰୊఺ΫϥΠΞϯτʹछʑͷෳࡶ͕͋͞Δ • ༷ʑͳϗετΛ௚઀஌Βͳ͚Ε͹ͳΒͳ͍ • ը໘Λߏ੒͢Δͷʹෳ਺ճ"1*ϦΫΤετ͕ඞཁ •

    ୯Ұͷ#BDLFOEͰ͋Ε͹ɺ(SBQI2-͕Ұͭͷղܾࡦ • ෳ਺ͷϚΠΫϩαʔϏε΁ͷݺͼग़͠͸ґવͱͯ͠໰୊ • ղܾࡦதؒ૚ʹαʔόΛ഑ஔʁ
  17.  "1*(BUFXBZύλʔϯ 17 • ͢΂ͯͷαʔϏεΛू໿͠ɺ'SPOUFOE޲͚ʹఏڙ͢Δ
 ϨΠϠ

  18.  "1*(BUFXBZύλʔϯ 18 • ,POHͳͲͷ"1*(BUFXBZ੡඼͕͋Δ • "1*ू໿ͷଞʹ΋ɺೝূɺྲྀྔ੍ޚͳͲΛ΍ͬͯ͘ΕΔ • جຊతʹ͸#BDLFOEͷΤϯδχΞ͕؅ཧ͢Δ΋ͷ

  19.  "1*(BUFXBZύλʔϯ 19 • "1*(BUFXBZʹಠࣗͷϩδοΫ͸࣋ͨͤʹ͍͘ • ϩδοΫΛ࣋ͭͱɺڊେͳ݁߹ϨΠϠʹͳΓɺΫϥΠΞϯ τͷ૿Ճʹରͯ͠εέʔϧ͠ͳ͍ • ༷ʑͳϩδοΫ͕ฆΕࠐΈ΍͘͢ͳΓɺ݁ՌతʹϚΠΫϩ

    αʔϏεͷಠཱੑΛ્֐͠΍͍͢ • 'SPOUFOE͕ࣗ༝ʹ࢖͑ΔϨΠϠͰ͸ͳ͍ • ෳ਺ͷϦιʔεΛϦΫΤετͰฒྻʹऔಘɺ͸
 Ͱ͖Δ ੡඼΋͋Δ  • ෳ਺ͷϦιʔεΛϚʔδͯ͠ฦ͢ɺͳͲ͸Ͱ͖ͳ͍
  20.  #''ύλʔϯ 20 • ΫϥΠΞϯτ͝ͱʹɺར༻͢ΔαʔϏεΛू໿͢Δ

  21.  #''ύλʔϯ 21 • "1*(BUFXBZύλʔϯͱ͸ࣅͯඇͳΔ΋ͷ • αʔϏεଆ͕ू໿ͯ͠ఏڙ͢ΔͷͰ͸ͳ͘ɺ
 ϑϩϯτΤϯυଆ͕ࣗ෼ͰબΜͰू໿͍ͯ͠Δ • ϚΠΫϩαʔϏεͷࣗ཯ੑ͕อͨΕΔ

    • ϑϩϯτΤϯυͷࣗ༝౓͕ߴ͍
  22. 'SPOUFOE❤#''❤#BDLFOE

  23. #''ͷ஫ҙ఺ 23 • ຊདྷ͸όοΫΤϯυͰ΍Δ΂͖ϩδοΫΛ
 #''ʹ࣋ͨͳ͍Α͏ʹ͢Δ • ྑ͘ͳ͍ྫ#''Ͱߋ৽ॲཧΛΦʔέετϨʔγϣϯ • ͍ͣΕ͔ͷόοΫΤϯυαʔϏε͕Ұٛతʹߋ৽ॲཧΛड ͚ɺͦͷαʔϏε͕ඇಉظΠϕϯτΛൃߦ͠ଞαʔϏεʹ

    ఻೻ͤ͞ΔͱΑ͍ • ϚΠΫϩαʔϏεශ݂঱ʹ஫ҙ • ۃྗόοΫΤϯυʹدͤΔҙࣝ
  24. ͜͜Ͱએ఻ 24 • ٕज़ॻయͰʮ.JDSPTFSWJDFTBSDIJUFDUVSFΑΖͣຊʯ ͱ͍͏ಉਓࢽΛग़͠·ͨ͠ • 'J/$ͷΤϯδχΞਓͷڞஶ • ඇಉظΞʔΩςΫνϟ΍.JDSP'SPOUFOETͷ࿩ͳͲΛղઆ ͍ͯ͠·͢ʂ

  25. ΞδΣϯμ 25 ‣ ষ#''ͱ͸ɺͦͷҐஔ͚ͮͱ໨త ‣ ষ#''ͱϚΠΫϩαʔϏεͷؔ܎ੑ ‣ ষ#''ͱͦͷྨࣅύλʔϯͷ࣮ફ ‣ 'J/$ͷ৽ࣄྫ#''GPSJ04"OESPJE"QQ

    ‣ .JDSP'SPOUFOET
  26. ΞδΣϯμ 26 ‣ ষ#''ͱ͸ɺͦͷҐஔ͚ͮͱ໨త ‣ ষ#''ͱϚΠΫϩαʔϏεͷؔ܎ੑ ‣ ষ#''ͱͦͷྨࣅύλʔϯͷ࣮ફ ‣ 'J/$ͷ৽ࣄྫ#''GPSJ04"OESPJE"QQ

    ‣ .JDSP'SPOUFOET
  27. ߏ੒ਤ 27

  28. J04 "OESPJEͰͭͷ#'' 28 • J04"OESPJEͰجຊతʹಉ͡ΞϓϦΛఏڙ͍ͯ͠Δ • ػೳɺը໘ߏ੒ɺભҠͳͲ͸ಉ͡ • ࡉ͔͍6*͸ϓϥοτϑΥʔϜ͝ͱʹҟͳΔ͕ɺ
 ͜Ε͸$MJFOUଆ͕୲౰͢Δɻ#''ͷ੹຿Ͱ͸ͳ͍

    • #''͕୲౰͢ΔϨΠϠ͸ɺΉ͠Ζڞ௨Խ͔ͨͬͨ͠ • %PNBJO%SJWFO%FTJHOͰݴ͏ͱ͜Ζͷ 3FQPTJUPSZ૚ͱ ͯ͠%PNBJO0CKFDUΛฦ͢ͱ͜Ζ·ͰΛຊ౰͸୲౰͍ͨ͠ • ݴޠͷน͸·ͨ͛ͳ͍ͷͰ׬શͳ%PNBJO0CKFDUΛฦ͢ͷ ͸ແཧ͕ͩɾɾɾ
  29. 8IZH31$ 29 • 31$ܗࣜͷݺͼग़͠ʹ͔ͨͬͨ͠ • ਖ਼֬ʹ͸ʮ3&45GVM͸ආ͚͔ͨͬͨʯ͔΋ • ఏڙͷ໨త͕୯ҰͰ͋ΓɺΫϥΠΞϯτΛڧ͘ҙࣝͨ͠"1* ʹͯ͠໰୊ͳ͍ Ή͠Ζ͢Δ΂͖

     • 3&45GVMతͳ"1*ʹ͢Δͱɺ$MJFOUͰ΋+40/ΛϚοϓ͢Δίʔ υ͕ଟ͘ඞཁʹͳΔ • J04"OESPJEͰͷ࣮૷ͷࠩ෼ΛͳΔ΂͘ͳ͍ͨ͘͠ • ʮ#''͸31$తͳ"1*ఏڙΛ͢΂͖ͩʯͱ͍͏ࡶͳఏىΛ ͓ͯ͘͠ͷͰɺ࠙਌ձͱ͔Ͱٞ࿦͍ͨ͠ • ܕ΋ཉ͔ͬͨ͠ 1SPUPDPM#VGGFST
  30. 8IZ,PUMJO 30 • 'SPOUFOEͷΤϯδχΞ͕ॻ͘͜ͱΛڧ͘ҙ͍ࣝͯ͠Δ • "OESPJEͰ͸,PUMJOΛ࠾༻͍ͯ͠Δ • J04 4XJGU ͔Βͷֶशίετ΋௿͍

    • ʮฒྻॲཧʯͷཁ݅΋ΫϦΞͰ͖Δ • $PSPVUJOFTBSFFYQFSJNFOUBMJO,PUMJO  • ฒྻॲཧ͸ɺ#''Ͱ͸΄΅ඞਢཁ݅Ͱ͋Δ • ฒྻॲཧͰ͍͑͹(P΍/PEFKTͷ͕ݱঢ়͸্
  31. ΞδΣϯμ 31 ‣ ষ#''ͱ͸ɺͦͷҐஔ͚ͮͱ໨త ‣ ষ#''ͱϚΠΫϩαʔϏεͷؔ܎ੑ ‣ ষ#''ͱͦͷྨࣅύλʔϯͷ࣮ફ ‣ 'J/$ͷ৽ࣄྫ#''GPSJ04"OESPJE"QQ

    ‣ .JDSP'SPOUFOET
  32. ڀۃͷϚΠΫϩαʔϏε 32 • αʔϏε͕ಠཱͷσϓϩΠαΠΫϧΛ࣋ͪɺ
 Ϗδωεͷ1%$"Λߴ଎ʹճͤΔ • Ϗδωε͸όοΫΤϯυ͚ͩͰ͸ͳ͍ • 6*΋Ϗδωεʹؚ·ΕΔ͸ͣ •

    νʔϜͷதʹ#BDLFOE୲౰ 'SPOUFOE୲౰͕͍ͯ
 ڠྗ͍ͯ͠Δͷ͕ཧ૝ Ή͠Ζී௨ʁ  • #''͸'SPOUFOEνʔϜͷ࣋ͪ෺͚ͩͲɺ
 'SPOUFOEνʔϜ͸ͦ΋ͦ΋ϚΠΫϩαʔϏεͷཧ૝ͱ ൓͢Δʂ
  33. αʔϏε͕6*΋ఏڙʁ 33 • ϚΠΫϩαʔϏε͕6*ίϯϙʔωϯτΛఏڙ͢Δ • $MJFOU͕ͦΕΛ౷߹͢Δ

  34. JGSBNF 34 • JGSBNFΛར༻͢Ε͹Ͱ͖Δ • ֤αʔϏε͸௨ৗͷ)5.-Λఏڙ͢Δ • QPTU.FTTBHFͰ΍ΓͱΓ͢Δ

  35. ڀۃͷ.JDSP'SPOUFOET 35 • ͦΕ8FC$PNQPOFOUTͰͰ͖ΔΑ • ֤αʔϏε͸$VTUPN&MFNFOUTΛఏڙ͢Δ • $VTUPN&WFOUTͰ΍ΓͱΓ͢Δ

  36. .JDSP'SPOUFOETͷ໰୊ͱରࡦ 36 • 6* 69 ͷҰ؏ੑΛ୲อ͢Δͷ͕೉͍͠ • ΨΠυϥΠϯ΍6*ϥΠϒϥϦͰରॲ • খ͞ͳ'SPOUFOEνʔϜ͕


    $MJFOUͱελΠϧΨΠυΛϝϯςφϯε͢Δ
  37. .JDSP'SPOUFOETͷ͓ؾ࣋ͪ 37 • αʔϏεͷಠཱੑͱҰ؏ੑ͸ຊ࣭తʹτϨʔυΦϑ • τϨʔυΦϑΛཧղ͠ɺͦΕͧΕͰద੾ͳબ୒Λ • #''ͱͷϋΠϒϦουख๏΋औΕΔ • αʔϏεͷڥքͰ6*͕໌֬ʹ෼͔ΕΔ΋ͷ͸ɺ


    αʔϏε͕6*΋࣋ͭ • ͦ͏Ͱͳ͍΋ͷ͸#''Ͱ"1*߹੒
  38. ϋΠϒϦουख๏ 38

  39. 8FCҎ֎ͷ࿩ 39 • ωΠςΟϒΞϓϦͰ͸ʁ • جຊతʹ͸ αʔϏε͕6*Λ௚઀ఏڙͰ͖ͳ͍ • $MJFOUͷϞδϡʔϧԽΛۃྗϚΠΫϩαʔϏεͷ୯Ґʹ
 ߹Θ͍ͤͯ͘

    • ৔߹ʹΑͬͯ͸8FC7JFX΋͋Δ
  40. ·ͱΊ 40 • ϚΠΫϩαʔϏε͸ɺ֤ϏδωεΛಠཱͯ͠ߴ଎ʹ1%$" Λճ͍ͯͨ͘͠Ίͷख๏ • #''͸ɺϚΠΫϩαʔϏεͷ"1*౷߹Λߦ͏ • ֤'SPOUFOEͷॴ༗෺ͱͯ͠࡞Δ͜ͱͰɺ#BDLFOEͷಠཱੑ Λ୲อͨ͠··'SPOUFOE͕ࣗ༝ʹѻ͑Δ

    • #''͸31$తͳ"1*ఏڙΛ͢΂͖ͩ ࡶͳఏى  • ͞ΒʹϏδωεͷಠཱ౓ΛߴΊΔख๏͕͋ΓɺτϨʔυ Φϑ͕ଘࡏ͢Δ