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

Microserviceなんて最初からやるもんじゃ無かった

 Microserviceなんて最初からやるもんじゃ無かった

Microserviceなんて最初からやるもんじゃ無かった

threetreeslight

July 22, 2015
Tweet

More Decks by threetreeslight

Other Decks in Technology

Transcript

  1. MicroServiceͳΜͯ࠷ॳ͔Β
    ΍Δ΋Μ͡Όͳ͔ͬͨ
    Akira Miki
    Repro Inc.
    shinjuku.rb #27@metaps
    July 22, 2015

    View full-size slide

  2. Akira Miki
    CTO / Repro
    @treetreeslight

    View full-size slide

  3. ఆྔ෼ੳͰ͸෼͔Βͳ͍ݪҼΛ

    View full-size slide

  4. ಈը͔Βਪ࡯ͯ͠վળ͢Δπʔϧ

    View full-size slide

  5. ϓογϡ΋Ͱ͖ΔΑ͏ʹͳͬͨΑʂ

    View full-size slide

  6. At the first of Repro

    View full-size slide

  7. Repro͕΍Γ͍ͨ͜ͱ
    ৘ใΛૹͬͯ ม׵ͯ͠ ෼ੳ͢Δ
    ड͚औͬͯ

    View full-size slide

  8. ੹຿Λ෼͚ͯεέʔϥϏϦςΟ
    Λ୲อ͍ͨ͠

    View full-size slide

  9. ϚʔςΟϯϑΝ΢ϥʔޚେᐌ͘
    > The term "Microservice Architecture" has
    sprung up over the last few years to
    describe a particular way of designing
    software applications as suites of
    independently deployable services.
    http://martinfowler.com/articles/microservices.html

    View full-size slide

  10. ࣌୅͸ϚΠΫϩαʔϏγε
    ΩλίϨ

    View full-size slide

  11. Repro͕΍Γ͍ͨ͜ͱ
    ͱΓ·෼͚ͯ࡞ͬͪΌ͓͏!!!
    ৘ใΛૹͬͯ ม׵ͯ͠ ෼ੳ͢Δ
    ड͚औͬͯ

    View full-size slide

  12. ޷͖ͳݴޠͰΨϯΨϯ͍͜͏ʂ
    ৘ใΛૹͬͯ ม׵ͯ͠ ෼ੳ͢Δ
    ड͚औͬͯ

    View full-size slide

  13. ͋Εɺɺɺɺ

    View full-size slide

  14. εΩʔϚมߋ΍Βܕมߋ͢Δͱɻɻɻ
    ৘ใΛૹͬͯ ม׵ͯ͠ ෼ੳ͢Δ
    ड͚औͬͯ
    ϑΥʔϚοτ
    νΣοΫ

    ௚ͯ͠
    DB͕
    ৯͑ΔΑ͏ʹ
    ύʔεͯ͠
    Ϣʔβʔ΁ͷ

    ݟͤํ͔͑ͯ
    ૹΔϑΥʔϚοτ

    ߹Θͤͯ

    View full-size slide

  15. ᷓΕग़͢मਖ਼࿙Ε
    ๲Ε্͕Δ؅ཧίετ

    View full-size slide

  16. ݁ہ
    ৘ใΛૹͬͯ ม׵ͯ͠ ෼ੳ͢Δ
    ड͚औͬͯ
    • ϞϊϦγοΫʹ͢ΔιϦϡʔγϣϯ
    • ϏδωεϩδοΫͷζϨΛͳ͘͢

    View full-size slide

  17. ڭ܇ͦͷ̍
    • มԽʹڧ͍ΞʔΩςΫνϟ͸ɺܹ͘͠มԽ
    ʹڧ͍ͷͱ͸ҙຯ͕ҧ͏
    • มߋ͕සൃ͢Δ࣌ظ͸ϞϊϦγοΫ͡Όͳ
    ͍ͱͭΒ͍
    • ϏδωεϩδοΫ͕ಉ͡ͳΒ࢖͍ճ͢΂͖

    View full-size slide

  18. ༨ஊɾมߋͷܹ͠͞
    ̍͜͜೥Ͱ11ສߦॻ͍ͯ8ສߦফ͠·ͨ͠…

    View full-size slide

  19. After alpha release of Repro

    View full-size slide

  20. ϦΫΤετͲ͏ʹ͔͍ͨ͠
    ৘ใΛૹͬͯ ม׵ͯ͠ ෼ੳ͢Δ
    ड͚औͬͯ
    ϑΥʔϚοτ
    νΣοΫ

    View full-size slide

  21. ࠶ͼαʔϏε෼ׂ΁
    ৘ใΛૹͬͯ ม׵ͯ͠ ෼ੳ͢Δ
    ड͚औͬͯ
    ϑΥʔϚοτ
    νΣοΫ

    View full-size slide

  22. ࣦഊͨ͠ͷʹ·ͨ΍Δͷʁ

    View full-size slide

  23. ϏδωεϩδοΫͷґଘΛࣺͯΔ
    ৘ใΛૹͬͯ ม׵ͯ͠ ෼ੳ͢Δ
    ड͚औͬͯ
    ϑΥʔϚοτ
    νΣοΫ
    • ؆қͳνΣοΫʢJSONϑΥʔϚοτͱΩʔͱͳΔ஋ʣͩ
    ͚ʹ͢Δ
    • Ωʔ஋ͷଥ౰ੑνΣοΫ͸APIͰଞͷαʔόʔʹฉ͖ʹߦ͘

    View full-size slide

  24. ޙ޻ఔͰ࿫͑Δࣄ͸ޙ޻ఔ΁
    ৘ใΛૹͬͯ ม׵ͯ͠ ෼ੳ͢Δ
    ड͚औͬͯ
    ϑΥʔϚοτ
    νΣοΫ
    • ؆қͳνΣοΫʢJSONϑΥʔϚοτͱΩʔͱͳΔ஋ʣͩ
    ͚ʹ͢Δ
    • Ωʔ஋ͷଥ౰ੑνΣοΫ͸APIͰଞͷαʔόʔʹฉ͖ʹߦ͘

    View full-size slide

  25. ڭ܇ͦͷ̎
    • ୯Ұͷ੹຿ʹूதͤ͞Δ
    • ޙ޻ఔͷίετԼ͍͛ͨͱ͔ཉΛग़͞ͳ͍
    • ΋͠ɺ੹຿͔Β֎ΕΔߦҝΛ΍Γ͍ͨͱ͖
    ͸API࡞ͬͯୟ͖ʹߦ͘

    View full-size slide

  26. ϦΫΤετʹ߹Θͤͨ޻෉Λ͢Δ
    • ͋·Γʹଟ͍ϦΫΤετΛ͞͹͘ʹ͸Rails
    ͕ͭΒ͍ɻ
    • Ωϟογϡʹώοτ͠ͳ͍෼ੳσʔλ͸Ϧ
    ΫΤετʹ͕͔͔࣌ؒΔ=unicorn޲͔ͳ͍

    View full-size slide

  27. • ࠷ॳ͸ϞϊϦγοΫʹɺ͔ͦ͜ΒαʔϏε
    Λ෼͚Δํ͕੹຿͕໌֬ʹͳΔɻ
    • ϦΫΤετ਺΍ঢ়گʹԠͯ͡ɺ୯Ұͷ੹຿
    ʹಛԽͨ͠αʔϏεʹ෼ׂ͢ΔɻཉΛग़͞
    ͳ͍

    View full-size slide