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

グローバルサービスを作る時に考えておくこと #railsdm

グローバルサービスを作る時に考えておくこと #railsdm

https://techplay.jp/event/631428 Rails Developers Meetup #7 の発表資料です

Masato Nakamura

November 16, 2017
Tweet

More Decks by Masato Nakamura

Other Decks in Programming

Transcript

  1. άϩʔόϧαʔϏεΛ࡞Δ࣌ʹ
    ߟ͓͑ͯ͘͜ͱ
    Masato Nakamura(@m_nakamura145)
    Server-Side Engineer

    View full-size slide

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

    View full-size slide

  3. ࠓ೔͓࿩͢Δ͜ͱ
    • λΠϜκʔϯΛߟྀͨ͠RailsΞϓϦέʔγϣϯ։ൃʹ͍ͭͯ
    • τϨλʹ͓͚Δւ֎ରԠͷࣄྫ
    • ॕ೔ʹ͍ͭͯ
    • SMSૹ৴

    View full-size slide

  4. 3BJMTΞϓϦͷλΠϜκʔϯઃఆ
    w 3BJMTͱ.Z42-ͷλΠϜκʔϯΛ65$ʹҰகͤ͞Δ
    w τϨλͰ͸04ͷλΠϜκʔϯ΋65$
    w .Z42-ͷઃఆྫ

    View full-size slide

  5. DPOpHBQQMJDBUJPOSC
    w DPOpHUJNF@[POF
    w ΞϓϦέʔγϣϯͷσϑΥϧτλΠϜκʔϯΛઃఆ͢Δ
    w DPOpOHBDUJWF@SFDPSEEFGBVMU@UJNF[POF
    w %#͔Β೔෇ɾ࣌ࠁΛऔΓग़ͨ͠ࡍͷλΠϜκʔϯΛ5JNFMPDBM MPDBM
    ͱ
    5JNFVUD VUD
    ͷͲͪΒ͔ʹ͢Δ͔Λࢦఆ͢Δ

    View full-size slide

  6. DPOpHUJNF[POF

    View full-size slide

  7. DPOpHBDUJWF@SFDPSEEFGBVMU@UJNF[POF

    View full-size slide

  8. DPOpHBDUJWF@SFDPSEEFGBVMU@UJNF[POF

    View full-size slide

  9. λΠϜκʔϯจࣈྻͷอଘܗࣜ
    w %#ʹλΠϜκʔϯจࣈྻΛอଘ͢Δέʔε
    w τϨλͰ͸ͭͷళฮ͕ͭͷλΠϜκʔϯΛ͍࣋ͬͯΔ
    w "TJB5PLZPͷΑ͏ʹਖ਼ࣜͳจࣈྻͰอଘͨ͠ํ͕ྑ͍
    w 3BJMTͩͱ୹ॖܗ "DUJWF4VQQPSU5JNF;POF."11*/(
    ͕ࢦఆͰ
    ͖Δ͕ɺ3BJMTҎ֎͔Β௚઀σʔλʹΞΫηε͢ΔࡍʹࠔΔͷͰɺ୹
    ॖܗ͸อଘ͠ͳ͍΄͏͕ྑ͍

    View full-size slide

  10. ೔࣌Λѻ͏Ϋϥε
    w %BUF 3VCZ

    w %BUF5JNF 3VCZ

    w 5JNF 3VCZ

    w "DUJWF4VQQPSU5JNF8JUI;POF 3BJMT

    w 3BJMTΞϓϦͳΒҰ൪͓͢͢Ί

    View full-size slide

  11. "DUJWF4VQQPSU5JNF8JUI;POF
    w DPOpHBQQMJDBUJPOSCͷλΠϜκʔϯΛ࢖༻͢ΔͷͰɺγεςϜͷ
    λΠϜκʔϯʹӨڹΛड͚ͳ͍
    w 3VCZͷ5JNFOPXͳͲ͸3VCZඪ४ͷڍಈͰɺγεςϜͷλΠϜκʔ
    ϯʹӨڹΛड͚Δ
    w "DJUWF3FDPSEΛී௨ʹ࢖ͬͯΔͱDSFBUFE@BUͳͲ͸
    "DUJWF4VQQPSU5JNF8JUI;POFͳͷͰɺ͍ͭͷ·ʹ͔࢖͍ͬͯΔ͜
    ͱ͕ଟ͍

    View full-size slide

  12. έʔεผ࢖༻ྫ
    w ݱࡏ࣌ࠁΛऔಘ͢Δ
    w 5JNF[POFOPX·ͨ͸5JNFDVSSFOU 5JNF[POFOPXΛฦ͢

    w ֎෦͔Βೖྗ͞ΕΔ࣌ࠁΛѻ͏࣌
    w TUBSU@BU5JNF[POFBU QBSBNT<TUBSU@BU>UP@J

    View full-size slide

  13. τϨλʹ͓͚Δॕ೔
    w ҿ৯ళͷ৔߹ɺॕ೔͸ಛผͳӦۀ࣌ؒΛઃఆ͍ͯ͠Δ
    w ௨ৗ͓ٳΈͷ೔͸݄༵೔͕ͩɺ݄༵೔͕ॕ೔Ͱ͋Ε͹։ళ͍ͨ͠
    w ॕ೔ͷલ೔͸஗͘·ͰҿΈ͍ͨਓ͕ଟ͍ͷͰɺӦۀ࣌ؒΛ௕Ίʹ
    ͍ͨ͠

    View full-size slide

  14. τϨλʹ͓͚Δॕ೔
    w ॕ೔Λѻ͏HFN͸࢖͍ͬͯͳ͍
    w IUUQTHJUIVCDPNIPMJEBZTIPMJEBZTͳͲ
    w )PMJEBZNPEFMͱͯ͠%#ʹॕ೔σʔλΛӬଓԽ͍ͯ͠Δ

    View full-size slide

  15. ॕ೔σʔλͷूΊํ
    w ॕ೔͸ຖ೥ҟͳΔͷͰɺৗʹσʔλΛߋ৽͠ͳ͚Ε͹͍͚ͳ͍
    w ೔ຊͷ৔߹ɺຖ೥݄͝Ζͷ׭ใͰ࣍ͷ೥ͷྐྵཁ߲Λൃද
    w IUUQFDPNULOBPBDKQLPZPNJZPLP

    View full-size slide

  16. ւ֎ͷॕ೔
    w ΞϝϦΧ΍ΦʔετϥϦΞͷ৔߹ɺશࠃڞ௨ͷॕ೔ͷଞʹभ͝ͱʹ
    ॕ೔͕ҟͳΔ
    w τϨλͰॕ೔ʹରԠ͍ͯ͠Δࠃ͸ݱࡏ೔ຊɺγϯΨϙʔϧɺ୆࿷ͷϲ
    ࠃͷΈ
    w γϯΨϙʔϧɺ୆࿷ͷॕ೔σʔλ͸֤ࠃ੓෎ͷαΠτ͔Βऔಘͯ͠ɺ
    γϯΨϙʔϧݱ஍ϝϯόʔɺ୆࿷ਓϝϯόʔ͕໨ࢹ֬ೝͯ͠อଘ͢Δ

    View full-size slide

  17. τϨλʹ͓͚Δ4.4ͷར༻༻్
    w ༧໿࡞੒࣌ɾมߋ࣌ɾΩϟϯηϧ࣌ͷ௨஌
    w ແஅΩϟϯηϧυλΩϟϯ๷ࢭͷϦίϯϑΝʔϜ
    w ͓ళͷϧʔϧΛࣄલʹ͓஌Βͤ
    w ๨Ε෺ͷ͝࿈བྷ
    w དྷళޙͷ͓ྱ

    View full-size slide

  18. τϨλʹ͓͚Δւ֎Ͱͷ4.4ૹ৴
    w Πϯό΢ϯυधཁͰɺผͷࠃͷ͓٬ཱྀ༷͕ߦલʹ͓ళΛ༧໿͢Δέʔ
    ε͕ଟ͍
    w γϯΨϙʔϧ΍୆࿷ͳͲͷҿ৯ళ
    w ߳ߓʹॅΜͰΔਓ͕୆࿷ͷ͓ళΛ༧໿͔ͯ͠Βཱྀߦʹߦ͘
    w ҿ৯ళଆ͸͓٬ཱྀ༷͕ߦʹߦ͘લʹ4.4Ͱ࿈བྷΛૹΓ͍ͨʂ
    w 4.4ૹ৴αʔϏε͸5XJMJPΛར༻

    View full-size slide

  19. ࠃ൪߸
    w ೔ຊ
    ɺ γϯΨϙʔϧ
    ͷΑ͏ͳ֤ࠃʹׂΓ౰ͯΒΕͨࠃࡍ
    ి࿩൪߸
    w 5XJMJP͸4.4ૹ৴ʹࠃ൪߸͕ඞਢ
    w ͓٬༷ͷి࿩൪߸Λอଘ͢Δͱ͖ʹඞͣࠃ൪߸·Ͱอଘ͓ͯ͘͠
    w ࠃ൪߸͕ૹΒΕͯ͜ͳ͍৔߹͸ɺళฮ͕͋Δࠃͷࠃ൪߸ΛೖΕ͍ͯ
    Δ

    View full-size slide

  20. ࠓ೔͓࿩ͨ͜͠ͱ
    • λΠϜκʔϯΛߟྀͨ͠ΞϓϦέʔγϣϯ։ൃʹ͍ͭͯ
    • τϨλʹ͓͚Δւ֎ରԠͷࣄྫ

    View full-size slide