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

Shared Code Management With Incomplete Microser...

itosho
October 30, 2017

Shared Code Management With Incomplete Microservices

Dev7++ Study Night 第3回の登壇資料です。『“不完全”なマイクロサービスでの共有コードの扱いについて
』というテーマで話しました。

itosho

October 30, 2017
Tweet

More Decks by itosho

Other Decks in Programming

Transcript

  1. $POOFIJUP*OD w ڊେͳϞϊϦγοΫγεςϜ͔Βͷ୤٫ w αʔϏεʢϦϙδτϦʣͷ૿Ճ w νʔϜͷࡉ෼Խʢίϯ΢ΣΠͷ๏ଇʣ  ϞϊϦγοΫͰ΋ϚΠΫϩαʔϏεͰ΋ͳ͍͕ɺ
 αʔϏε͕෼཭͠͸͡Ί͍ͯΔঢ়ଶ

    ෆ׬શͳϚΠΫϩαʔϏε ˞ޡղ͕ͳ͍Α͏ʹัଊ͓ͯ͘͠ͱɺ
 ɹݱ࣌఺Ͱίωώτ͸ϚΠΫϩαʔϏεΛ໨ࢦ͍ͯ͠ΔΘ͚Ͱ͸͋Γ·ͤΜɻ
 ɹʢϞϊϦγοΫͱݺ΂Δཁૉ΋ଟ͘࢒͍ͬͯ·͢ʣ 8IBU`TlJODPNQMFUFz.JDSPTFSWJDFT ͦͷ݁ՌɺԿ͕ى͖͔ͨʁ
  2. $POOFIJUP*OD )PXUPNBOBHFTIBSFEDPEFT w ֤αʔϏεʢϦϙδτϦʣؒͰൃੜ͢Δίʔυͷॏෳ  ෆ׬શͳϚΠΫϩαʔϏε͕΋ͨΒ͢՝୊ ڞ༗ίʔυͷछྨ w ϏδωεϩδοΫ
 ୯७ʹαʔϏεؒͷ੹຿͕ᐆດͰ͋Δ͜ͱଟ͍


    αʔϏεͷద੾ͳϞσϧԽΛ͢Ε͹ॆ෼ʹରॲՄೳ
 جຊతʹഉআ͢΂͖
 w ੩తσʔλʢࠓ೔࿩͢ͷ͸ͪ͜Βʣ
 %#Ͱ؅ཧ͢Δ΄ͲͰ͸ͳ͍ྻڍܕͰදݱग़དྷΔΑ͏ͳσʔλ
 ྫʣࠃίʔυɺੑผɺখ͞ͳΧςΰϦʔɺઃఆ৘ใͳͲ
 ্هͷΑ͏ͳ৘ใٴͼͦͷ৘ใʹؔ࿈͢ΔϩδοΫ
 ෛ࠴ʹͳΓͮΒ͍ͷͰॏෳ͕͕ͤͪͩ͞ɺঃʑʹมߋ͕໘౗ʹͳΔɻ
  3. $POOFIJUP*OD "QQSPBDI"1*1BUUFSO w ׬શʹ%3:ͳঢ়ଶʹͳΔ w ࠷΋ϚΠΫϩαʔϏεతͳΞϓϩʔν  1SPT $POT w

    )551௨৴ʹΑΔΦʔόʔϔου w 4USJDU͗͢ΔΞϓϩʔν w ͨͩࠃ΍౎ಓ෎ݝͷ৘ใ͕ཉ͍͚ͩ͠ͳͷʹʜ
  4. $POOFIJUP*OD w "1*ύλʔϯΑΓ΋Φʔόʔϔου͕গͳ͍ w ֤αʔϏε͕ಉ͡ݴޠͰ࣮૷͞Ε͍ͯΔ৔߹͸ಋೖίετ͕௿͍ w ࠷΋ݱ࣮తͳΞϓϩʔν
 4UBDL0WFSqPXͰ΋͜ͷΞϓϩʔν͕ࢧ࣋͞Ε͍ͯͨ  1SPT

    $POT w "1*ύλʔϯΑΓ΋αʔϏεؒͷ݁߹౓͕ߴ·Δ
 ύοέʔδ؅ཧΛར༻͢Δ͜ͱͰ͋Δఔ౓ϦεΫ͸Լ͛ΒΕΔ w ֤αʔϏε͕ҟͳΔݴޠͰ࣮૷͞Ε͍ͯΔ৔߹͸%3:ʹͳΓͮΒ͍ w ϚΠΫϩαʔϏεͷϝϦοτͷͻͱͭͰ͋Δʮٕज़ҟ࣭ੑʯΛڗडͮ͠Β͍ "QQSPBDI-JCSBSZ1BUUFSO ˞4IBSJOHDPEFBOETDIFNBCFUXFFONJDSPTFSWJDFT IUUQTTUBDLPWFSqPXDPNRVFTUJPOTTIBSJOHDPEFBOETDIFNBCFUXFFONJDSPTFSWJDFT
  5. $POOFIJUP*OD "QQSPBDI#JMBZFS-JCSBSZ1BUUFSO  ೋ૚ϥΠϒϥϦύλʔϯͷΠϝʔδ ˙ΞΠυϧ&$ αʔϏε" ʢ$BLF1)1ʣ αʔϏε# ʢ3BJMTʣ 1)1ϥΠϒϥϦ

    ʢ$PNQPTFSʣ 3VCZϥΠϒϥϦ ʢ(FNʣ ੩తσʔλʢ50.-ʣ (JU4VCUSFFΛར༻ͯ͠ɺ
 ੩తσʔλΛऔΓࠐΉɻ IUUQTHJUIVCDPNJUPTIPJEPMFDDPOTUBOUTNBTUFS IUUQTHJUIVCDPNJUPTIPJEPMFDTFSWJDF IUUQTHJUIVCDPNJUPTIPJEPMFDTFSWJDF IUUQTHJUIVCDPNJUPTIPJEPMFDDPOTUBOUTQIQ IUUQTHJUIVCDPNJUPTIPJEPM@FD@DPOTUBOUT@SVCZ ˞ίʔυ͸งғؾͳͷͰɺΠϝʔδΛ௫Ήఔ౓ʹࢀর͍ͯͩ͘͠ʜɻ ˞੩తσʔλ͸50.-Λ࢖͍ͬͯ·͕͢ɺ͓޷ΈͰ:".-ͳΓ+40/ͳΓࣗ༝ʹར༻͍ͯͩ͘͠͞ɻ
  6. $POOFIJUP*OD  1SPT "QQSPBDI#JMBZFS-JCSBSZ1BUUFSO w ੩తσʔλ͕Ұݩ؅ཧग़དྷΔ w ෳ਺ݴޠͰ΋%3:Խग़དྷΔ $POT w

    ௨ৗͷϥΠϒϥϦύλʔϯಉ༷ʹαʔϏεؒͷ݁߹౓͸ߴ͘ͳΔ w (JU4VCUSFFΛར༻͢ΔͷͰ؅ཧ͕ෳࡶʹͳΔϦεΫ
 ن໛͕খ͚͞Ε͹֤αʔϏε͕50.-ϑΝΠϧΛ(JU4VCUSFFͰऔΓࠐΉͷ΋͋Γʁ
 ΫϥΠΞϯτϥΠϒϥϦͰར༻͢Δͷ͸ආ͚ͨ΄͏͕ϕλʔʁ
  7. $POOFIJUP*OD "QQSPBDI  ׬શͳϚΠΫϩαʔϏεΛͭ͘Δ w ڞ༗ίʔυͷ໰୊ͷଟ͘͸ෆ׬શͳϚΠΫϩαʔϏεނʹى͜Δ w ڥք͚ͮΒΕͨίϯςΩετͷ΋ͱద੾ʹαʔϏεΛ෼ׂ͢Ε͹0,ʁ ͔͠͠ɺڞ༗ίʔυ͕θϩʹͳΔ͜ͱ͸ͳ͍ w

    5IPVHIU8PSLTࣾͷ4BN/FXNBOࢯᐌ͘ɺ
 lͭͷϚΠΫϩαʔϏε಺Ͱ͸%3:ΛഁΒͳ͍͚ΕͰ΋ɺ
 ͢΂ͯͷαʔϏεʹΘͨΔ%3:ͷҧ൓ʹ͸׮େʹରॲ͠·͢ɻz
  8. $POOFIJUP*OD 1PFN  ׬ᘳͳγεςϜͳͲଘࡏ͠ͳ͍ w ϚΠΫϩαʔϏε΋ۜͷ஄ؙͰ͸ͳ͍ w αʔϏεͷϑΣΠζ΍ن໛ʹΑͬͯ΋ਖ਼ղ͸ҟͳΔ w ͋ΒΏΔΞʔΩςΫνϟ͸खஈͷͻͱͭʹա͗ͳ͍

    w ׬ᘳͳγεςϜ͸ଘࡏ͠ͳ͍͚Ͳɺ
 ͔ͩΒͱݴͬͯͦ͜ΛఘΊΔͷ͸Ͱ͸ͳ͘ɺ
 ͦΕͰ΋ɺগ͠Ͱ΋׬ᘳͰ͋Ζ͏ͱ౒ྗΛଓ͚͍ͯ͘͜ͱେ੾
 ʜͳͷ͔ͳʁ
  9. $POOFIJUP*OD 3FGFSFODF w ʰϚΠΫϩαʔϏεΞʔΩςΫνϟʱʢΦϥΠϦʔɾδϟύϯ ʣ
 ஶɿ4BN/FXNBO ؂༁ɿࠤ౻௚ੜ ༁ɿ໦Լ఩໵
 w .JDSPTFSWJDFTJP


    IUUQNJDSPTFSWJDFTJP w ࣾ಺Ͱԣஅతʹ࢖͑Δ1)1ϥΠϒϥϦΛॻ͜͏ʂ
 IUUQTPUBIBUFOBCMPHDPNFOUSZ w (JUTVCUSFFͷύϫʔ
 IUUQKBQBOCMPHTBUMBTTJBODPNUIFQPXFSPGHJUTVCUSFF  ࢀߟจݙࢀߟαΠτ