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

Server-Side Team in Toreta

Server-Side Team in Toreta

https://atnd.org/events/89458 の発表資料です

Masato Nakamura

August 08, 2017
Tweet

More Decks by Masato Nakamura

Other Decks in Programming

Transcript

  1. Server-Side Team in Toreta
    @m_nakamura145

    View full-size slide

  2. ࣗݾ঺հ
    • Masato Nakamura
    • @m_nakamura145
    • Server-Side Engineer
    • Recruit Holdings -> Toreta(2016/10ʙ)

    View full-size slide

  3. ࠓ೔͓࿩͢Δ͜ͱ
    • τϨλͷαʔϏεͱAPIΞʔΩςΫνϟ
    • αʔόαΠυνʔϜͷϛογϣϯ
    • Ϣʔβͷ՝୊Λղܾ͢ΔͨΊʹ΍͍ͬͯΔ͜ͱ

    View full-size slide

  4. Toreta Core API
    • First commit͸2013೥8݄
    • िʹ1ճͷDeploy
    • ݱࡏ5໊Ͱ։ൃ
    • @swdyh,@ziguzagu,@serihiro,@fregdee,@m-nakamura145

    View full-size slide

  5. +----------------------+-------+-------+---------+---------+-----+-------+
    | Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
    +----------------------+-------+-------+---------+---------+-----+-------+
    | Controllers | 22229 | 19006 | 173 | 942 | 5 | 18 |
    | Helpers | 223 | 200 | 0 | 26 | 0 | 5 |
    | Models | 12651 | 7693 | 187 | 510 | 2 | 13 |
    | Mailers | 370 | 312 | 10 | 19 | 1 | 14 |
    | Javascripts | 4701 | 2948 | 16 | 367 | 22 | 6 |
    | Libraries | 1699 | 1264 | 36 | 112 | 3 | 9 |
    | Concern specs | 478 | 396 | 0 | 3 | 0 | 130 |
    | Controller specs | 29728 | 26235 | 3 | 7 | 2 | 3745 |
    | Helper specs | 139 | 118 | 0 | 0 | 0 | 0 |
    | Lib specs | 498 | 441 | 0 | 0 | 0 | 0 |
    | Mailer specs | 2009 | 1721 | 0 | 1 | 0 | 1719 |
    | Model specs | 13909 | 10891 | 0 | 2 | 0 | 5443 |
    | Request specs | 91 | 66 | 0 | 0 | 0 | 0 |
    | View specs | 672 | 569 | 0 | 0 | 0 | 0 |
    | Worker specs | 3583 | 3113 | 1 | 4 | 4 | 776 |
    +----------------------+-------+-------+---------+---------+-----+-------+
    | Total | 92980 | 74973 | 426 | 1993 | 4 | 35 |
    +----------------------+-------+-------+---------+---------+-----+-------+

    View full-size slide

  6. ن໛
    • αʔϏεఏڙࠃ:15ϱࠃҎ্ʢ೔ຊɺγϯΨϙʔϧɺ୆࿷ɺؖࠃɺϕτφϜɺϚ
    ϨʔγΞɺΠϯυωγΞɺλΠɺΧϯϘδΞɺϑΟϦϐϯɺχϡʔδʔϥϯυɺΦʔετϥϦΞɺ
    ΞϝϦΧɺΠΪϦεɺΤδϓτ, etc…ʣ
    • ళฮ਺:໿8500ళฮ
    • ྦྷܭ༧໿ਓ਺:໿1ԯ2000ສਓ

    View full-size slide

  7. "1*ΞʔΩςΫνϟ

    View full-size slide

  8. Toreta Manager iPad Client Web Reservation
    (Customer)
    Phone Call
    Toreta Core API

    View full-size slide

  9. POS Toreta Manager iPad Client Web Reservation
    (Customer)
    Phone Call
    POS Connect API Toreta Core API

    View full-size slide

  10. POS Toreta Manager iPad Client Web Reservation
    (Customer)
    Phone Call Gourmet media
    POS Connect API Toreta Core API Mail Importer API

    View full-size slide

  11. POS Toreta Manager iPad Client Web Reservation
    (Customer)
    Phone Call Gourmet media
    POS Connect API Toreta Core API Mail Importer API
    MySQL to
    BigQuery

    View full-size slide

  12. αʔόαΠυνʔϜͷϛογϣϯ
    • ٕज़ͱσʔλΛ࢖ͬͯϢʔβͷຊ࣭తͳ՝୊Λղܾ͢Δ
    • ϢʔβʹܟҙΛࠐΊͯରԠ͢Δ
    • ٕज़Ͱ૊৫શମͷੜ࢈ੑΛ্͛Δ

    View full-size slide

  13. ΞΫγϣϯ
    • τϨλͷશAPIͷઃܭɾ։ൃɾӡ༻
    • ࣾ಺޲͚πʔϧʢa.k.aτϨλ؅ཧʣͷ։ൃ
    • ໰͍߹ΘͤରԠ
    • ෼ੳΫΤϦͷ࡞੒

    View full-size slide

  14. τϨλ؅ཧ
    • ࣾ಺޲͚؅ཧπʔϧ
    • ಋೖళฮͷτϨλར༻ঢ়گΛݟΔɾઃఆΛ؅ཧ͢Δ
    • ࣾһશһ͕ຖ೔ݟΔ

    View full-size slide

  15. "1*։ൃ
    • Design Doc
    • Github issues
    • ࣮૷ɾςετ
    • ಈ࡞֬ೝ on Shining Wizard
    • QA
    • ϦϦʔε

    View full-size slide

  16. • ػೳ։ൃͱಉ͡ॏཁ౓ͰϦϑΝΫλϦϯά͢Δ
    • খ͍͞ϦϑΝΫλϦϯά͸ػೳ։ൃͷϓϩδΣΫτ಺Ͱߦ͏
    • Gemͷ੔ཧͳͲɺ͋Δఔ౓·ͱ·ͬͨλεΫ͸վળ෦Ͱߦ͏
    • େ͖͍ϦϑΝΫλϦϯά͸ͦΕࣗମΛϓϩδΣΫτʹ͢Δ
    Refactoring

    View full-size slide

  17. ໰͍߹ΘͤରԠ
    • ͓٬༷͔Βͷ௚઀తͳ໰͍߹Θͤ͸ΧελϚʔαϙʔτνʔϜ
    ͕ରԠ
    • όάͷ͍ٙ΍ෳࡶͳ࢓༷֬ೝͷ࣌ʹΤϯδχΞ͕ରԠ
    • ࣋ͪճΓ੍Ͱ͸ͳ͘ɺνʔϜશһͰ൓Ԡͯ͠ૣ͔ͬͨਓ͕ରԠ
    • جຊతʹͰ͖Δ͚͙ͩ͢ରԠͦ͠ͷ৔Ͱ໰୊ղܾ͢Δ

    View full-size slide

  18. σʔλͱ޲͖߹͏
    • ਖ਼͍͠՝୊ʹऔΓ૊ΉͨΊʹ
    • ࡞ͬͨػೳ͕՝୊Λղܾ͔ͨ͠Λ͔֬ΊΔͨΊʹ
    • τϨλΛಋೖ͍͍ͯͨͩͨ͠ళฮΛαϙʔτ͢ΔͨΊʹ

    View full-size slide

  19. ਖ਼͍͠՝୊ʹऔΓ૊Ή
    • ৽ػೳͷՁ஋ԾઆΛߟ͑Δஈ֊͔ΒσʔλΛݟͳ͕Βٞ࿦͢Δ

    View full-size slide

  20. ࡞ͬͨػೳ͕՝୊Λղܾ͔ͨ͠Λ͔֬ΊΔ
    • ৽ػೳΛϦϦʔε͢Δ͚ͩͰऴΘΒͳ͍
    • ࣮ࡍʹػೳ͕࢖ΘΕ͍ͯΔ͔Λσʔλ͔Β֬ೝ͢Δ
    • ࣍ͷਖ਼͍͠՝୊΁ͷώϯτΛಘΔ

    View full-size slide

  21. • τϨλΛಋೖ͍͍ͯͨͩͨ͠ళฮΛαϙʔτ͠ɺച্Λ࠷େԽ
    ͢Δάϧʔϓ
    • SaaSͷཁ
    • ཭୤཰ʢChurmʣΛ௿͘͢ΔͨΊʹɺళฮʹ޲͚༷ͯʑͳΞΫ
    γϣϯΛى͜͢
    • ΞΫγϣϯΛى͜͢΂͖ళฮΛσʔλ͔Βಋ͖ग़͢
    Customer Success Group

    View full-size slide

  22. σʔλͷ࣭Λ্͍͛ͯ͘
    • ܧଓతͳDB Refactoring
    • Data Martͷ࡞੒
    • ࠓ·ͰऔΕͯͳ͔ͬͨσʔλΛऔΕΔΑ͏ʹ͢Δ
    • ྫ: τϨλϑΥϯ
    • ࣾ಺Ͱ͍Ζ͍Ζͳਓ͕σʔλ෼ੳΛߦ͑ΔΑ͏ʹ͢Δ

    View full-size slide

  23. • τϨλͷαʔϏεͱAPIΞʔΩςΫνϟ
    • αʔόαΠυνʔϜͷϛογϣϯ
    • Ϣʔβͷ՝୊Λղܾ͢ΔͨΊʹ΍͍ͬͯΔ͜ͱ
    ࠓ೔͓࿩ͨ͜͠ͱ

    View full-size slide