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

ユビーのアーキテクチャに対する取り組み

 ユビーのアーキテクチャに対する取り組み

Kazuhito Hokamura

September 06, 2022
Tweet

More Decks by Kazuhito Hokamura

Other Decks in Technology

Transcript

  1. ϢϏʔͷΞʔΩςΫνϟʹର͢ΔऔΓ૊Έ
    2022/9/7 @hokaccha
    ʲUbie x Gaudiy x Χ΢γΣʳελʔτΞοϓʹ͓͚ΔArchitectureͷมભ

    View full-size slide

  2. 2
    About Me
    Kazuhito Hokamura
    software engineer
    @hokaccha
    @hokaccha

    View full-size slide

  3. 3
    UbieͷϓϩμΫτ
    ੜ׆ࣾ޲͚ʢtoCʣ ҩྍػؔ޲͚ʢtoBʣ

    View full-size slide

  4. 4
    Agenda
    1. ϢϏʔͷγεςϜΞʔΩςΫνϟ֓ཁ
    2. ݱঢ়ͷٕज़త՝୊
    3. ͜Ε·ͰͷऔΓ૊Έࣄྫ
    4. ࠓޙͷվળʹ޲͚ͯ

    View full-size slide

  5. 5
    Agenda
    1. ϢϏʔͷγεςϜΞʔΩςΫνϟ֓ཁ
    2. ݱঢ়ͷٕज़త՝୊
    3. ͜Ε·ͰͷऔΓ૊Έࣄྫ
    4. ࠓޙͷվળʹ޲͚ͯ

    View full-size slide

  6. 6
    ར༻͍ͯ͠Δٕज़
    ● Πϯϑϥ͸GCP/GKE
    ● όοΫΤϯυ͸Kotlin/Spring Boot͕ଟΊ
    ● Ұ෦Go΍RailsɺPython΋͋Δ
    ● ϑϩϯτΤϯυ Next.js/React/Typescript
    ● ௨৴͸GraphQL/REST
    ※ਤ͸Ұ෦؆ུԽ͍ͯ͠ΔͷͰશͯͰ͸ͳ͍

    View full-size slide

  7. 7
    Agenda
    1. ϢϏʔͷγεςϜΞʔΩςΫνϟ֓ཁ
    2. ݱঢ়ͷٕज़త՝୊
    3. ͜Ε·ͰͷऔΓ૊Έࣄྫ
    4. ࠓޙͷվળʹ޲͚ͯ

    View full-size slide

  8. 8
    ݱঢ়ͷ՝୊
    ● υϝΠϯ͕੒௕ͨ͜͠ͱͰੜ͍ͯ͡Δ

    ઃܭɾ࣮૷ͱͷΪϟοϓ
    ● αʔϏεؒͷڥք͕ᐆດʹͳΓγεςϜͷ
    ෳࡶ͕͞രൃ
    ● ݴޠɺϑϨʔϜϫʔΫɺϓϩτίϧ͕౷Ұ
    ͞Ε͍ͯͳ͍͜ͱʹΑΔੜ࢈ੑͷ௿Լ

    View full-size slide

  9. 9
    ͜ͷ··ʹ͢ΔͱͲ͏ͳΔ͔
    ࣌ؒͷܦաͱ͓΋ʹࢦ਺ؔ਺తʹ
    ։ൃίετ͕๲ΒΜͰ͍͘

    View full-size slide

  10. 10
    ΞʔΩςΫνϟΛվળ͢Δཧ༝
    ● ͜ͷ܏͖ΛͰ͖Δ͚ͩখ͍ͨ͘͞͠
    ● ཧ૝తʹ͸ઢܗʹ͍ͨ͠

    View full-size slide

  11. 11
    Agenda
    1. ϢϏʔͷγεςϜΞʔΩςΫνϟ֓ཁ
    2. ݱঢ়ͷٕज़త՝୊
    3. ͜Ε·ͰͷऔΓ૊Έࣄྫ
    4. ࠓޙͷվળʹ޲͚ͯ

    View full-size slide

  12. 12
    ՝୊
    ● ༷ʑͳυϝΠϯ͕৐͍ͬͯΔϞϊϦε
    ○ ໰਍αʔϏε
    ○ ҩྍػؔͷ؅ཧ
    ○ ҩྍϚελʔσʔλͷ؅ཧ
    ● toB/toC྆ํ͔Βࢀর͞Ε͍ͯΔ
    ○ ੜ࢈ੑͷ௿Լ
    ○ ৴པੑͷ௿Լ

    View full-size slide

  13. 13
    վળઓུ
    ● toB/toCͰ໰਍αʔϏεΛ෼͚Δ
    ○ ڞ౗ΕϦεΫͷղফ
    ○ ϦϦʔεϑϩʔ͕෼཭Ͱ͖Δ
    ○ ։ൃ࣌ʹ͓ޓ͍Λߟྀ͢Δඞཁ͕ͳ͘ͳΔ
    ● ҩྍػؔ΍ҩྍϚελʔσʔλ؅ཧͱ͍͏

    υϝΠϯΛผαʔϏεʹ੾Γग़͢
    ○ ҩྍػؔυϝΠϯ͸toBͷΈ
    ○ Ϛελʔσʔλ͸ڞ௨Ͱ࢖͏͕جຊతʹ
    read onlyͳͷͰෛՙ෼ࢄ͕༰қ

    View full-size slide

  14. 14
    Agenda
    1. ϢϏʔͷγεςϜΞʔΩςΫνϟ֓ཁ
    2. ݱঢ়ͷٕज़త՝୊
    3. ͜Ε·ͰͷऔΓ૊Έࣄྫ
    4. ࠓޙͷվળʹ޲͚ͯ

    View full-size slide

  15. 15
    ࠓޙͷվળʹ޲͚ͯ
    ● ΞʔΩςΫνϟͷվળɾෛ࠴ͷղফ͸Ҿ͖ଓ͖΍͍ͬͯ͘
    ● ੜ࢈ੑΛՄࢹԽͯ͠ΞʔΩςΫνϟͷվળͷޮՌΛܭଌ͢Δ
    ● ݴޠɾϑϨʔϜϫʔΫ౳Λ౷Ұͯ͠ੜ࢈ੑΛ࠷େԽ͢Δ

    View full-size slide

  16. 16
    Four Keysͷܭଌ
    ● σϓϩΠͷස౓ - ૊৫ʹΑΔਖ਼ৗͳຊ൪؀ڥ΁ͷϦϦʔεͷස౓
    ● มߋͷϦʔυλΠϜ - commit ͔Βຊ൪؀ڥՔಇ·Ͱͷॴཁ࣌ؒ
    ● มߋো֐཰ - σϓϩΠ͕ݪҼͰຊ൪؀ڥͰো֐͕ൃੜ͢Δׂ߹ʢ%ʣ
    ● αʔϏε෮ݩ࣌ؒ - ૊৫͕ຊ൪؀ڥͰͷো֐͔Βճ෮͢Δͷʹ͔͔Δ࣌ؒ
    Ҿ༻ݩ: https://cloud.google.com/blog/ja/products/gcp/using-the-four-keys-to-measure-your-devops-performance

    View full-size slide

  17. 17
    Four Keysͷܭଌ

    View full-size slide

  18. 18
    ݴޠɾϑϨʔϜϫʔΫ౳ͷ౷Ұ (As-Is)
    ● Kotlin/Spring Boot͸ӡ༻໘ͷ

    σϝϦοτ͕େ͖͘ͳ͖ͬͯͨ
    ● Rails΋ࠓޙ࠾༻͢ΔϝϦοτ͸΄΅ͳ͍
    ● ܕ͕΄͍͠ͷͰREST͸΍Ί͍ͨ
    ○ OpenAPI͸ͭΒ͍...
    ● ϑϩϯτΤϯυ͸ࠓޙ΋Next.js/React

    ͰΑͦ͞͏
    ● ج൫αʔϏεͳͲͰҰ෦Go΋͋Δ

    View full-size slide

  19. 19
    ݴޠɾϑϨʔϜϫʔΫ౳ͷ౷Ұ (To-Be)
    ● ։ൃݴޠΛTypeScriptʹ౷Ұ͢Δ͜ͱͰੜ
    ࢈ੑΛ࠷େԽ͍ͨ͠
    ● όοΫΤϯυͱͷ௨৴͸ӡ༻໘΍ύϑΥʔϚ
    ϯεͷϝϦοτΛͱͬͯgRPCʹ౷Ұ͍ͨ͠
    ● Node.jsͱgRPCͰݱ࣮తʹӡ༻͕Մೳ͔͸
    ݱࡏݕূத
    ● ج൫αʔϏεͳͲύϑΥʔϚϯε͕ٻΊΒΕ
    Δͱ͜ΖͰ͸Ҿ͖ଓ͖Go΋࠾༻͢Δ

    View full-size slide

  20. 20
    Conclusion
    ● ϢϏʔͷγεςϜ͸ϓϩμΫτͷ੒௕ͱͱ΋ʹෳࡶԽ͖ͯͨ͠
    ● ෛ࠴ͷղফΛ͜Ε·Ͱ΋΍͖ͬͯͨ͜͠Ε͔Β΋ܧଓͯ͠΍͍ͬͯ͘
    ● ݴޠ΍ϑϨʔϜϫʔΫ΋ΑΓྑ͍΋ͷΛ໨ࢦͯ͠࠶ߏஙΛݕ౼͍ͯ͠Δͱ͜Ζ

    View full-size slide

  21. 21
    Thank you.

    View full-size slide