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

メルカリの超高速開発を支えるPHP (PHPCon2014)

メルカリの超高速開発を支えるPHP (PHPCon2014)

PHPカンファレンス2014のスライドです。

Tatsuya Tsuruoka

October 11, 2014
Tweet

More Decks by Tatsuya Tsuruoka

Other Decks in Technology

Transcript

  1. ϑϦϚΞϓϦʮϝϧΧϦʯͷ
    ௒ߴ଎։ൃΛࢧ͑Δ1)1
    גࣜձࣾϝϧΧϦ
    ϓϦϯγύϧΤϯδχΞ
    ௽Ԭୡ໵
    UTVSVPLB!NFSDBSJBQQDPN
    !

    View full-size slide

  2. ࠓճ͓࿩͢Δ͜ͱ
    αʔόߏ੒
    Ͳ͏΍ͬͯεέʔϧ͖ͯͨ͠ʁ
    ϝΠϯݴޠ͸1)1
    ͳͥ1)1 1)1ͷྑ͍ͱ͜Ζ
    ͲΜͳߟ͑ํͰ։ൃ͖͔ͯͨ͠
    εϐʔυͷॏཁੑՁ஋ΛੜΉίʔυͱ͸

    View full-size slide

  3. ʮϝϧΧϦʯʹ͍ͭͯ

    View full-size slide

  4. w ೥݄ɺձࣾઃཱ
    w ೥݄ɺΞϓϦެ։

    View full-size slide

  5. w ຖ೔ສ݅Ҏ্ͷग़඼
    w ݄ؒྲྀ௨ֹ਺ेԯԁ
    w ςϨϏ$.์өத
    ສ%-ୡ੒

    View full-size slide

  6. αʔόߏ੒
    w ݱࡏͷαʔόɿ໿୆
    w -#ɺ8FCɺ%#ɺόονɺ

    ΩϡʔϫʔΧʔɺΩϟογϡ
    w ϐʔΫ࣌ϦΫΤετඵҎ্Λॲཧ

    View full-size slide

  7. Ͳ͏΍ͬͯεέʔϧ͖ͯͨ͠ʁ
    !
    w ڈ೥ͷ1)1ΧϯϑΝϨϯεͷࠒɺ

    αʔό͸୆͚ͩ අ༻ɿສԁ୆݄

    View full-size slide

  8. Ͳ͏΍ͬͯεέʔϧ͖ͯͨ͠ʁ
    w ೥Ͱഒʂʢڈ೥͕୆ͳͷͰʜʣ
    w ݱࡏͷߏ੒͸ୈࡾੈ୅໨
    w ୈҰੈ୅ɿ୆ʹશ෦
    w ୈೋੈ୅ɿ8FCͱ%#ͳͲ༻్ผʹ෼཭
    w ୈࡾੈ୅ɿ-#΍ΩϟογϡͰෛՙ෼ࢄ

    View full-size slide

  9. γϯϓϧˍϛχϚϜ
    w 8FCαʔόʹ͸΋ͪΖΜ1)1
    w "[email protected]ͷ

    Ͳ͜ʹͰ΋͋Δ؆୯ͳߏ੒
    w ୈҰੈ୅ͷߏ੒͸ͦΕ͚ͩ

    Ωϟογϡαʔό΋ͳ͠

    View full-size slide

  10. γϯϓϧˍϛχϚϜ
    w ୈࡾੈ୅ͷߏ੒Ͱෛՙ෼ࢄΛຊ֨Խ

    -#ɿOHJOY

    Ωϟογϡɿ.FNDBDIFEɺ3FEJT

    Ωϡʔɿ2.

    View full-size slide

  11. γϯϓϧˍϛχϚϜ
    w े෼ͳ࣮੷͕͋Δϛυϧ΢ΣΞ͚ͩͰ

    ߏ੒͞Ε͍ͯΔ
    w .Z42-ɺ.FNDBDIFEɺ3FEJT͸

    1)1͔Β؆୯ʹ࢖͑Δ

    View full-size slide

  12. ϝΠϯݴޠ͸1)1

    View full-size slide

  13. ͳͥ1)1
    w ૑ۀϝϯόʔͱܨ͕͍ͬͯΔ։ൃऀͷ

    ଟ͕͘1)1։ൃऀͩͬͨ
    w ΞϓϦΛ։ൃ͍ͯͨ࣌͠఺Ͱ

    ࠷΋։ൃϦιʔε͕֬อ͠΍͔ͬͨ͢
    w ͭ·Γɺ୯ʹ਎ۙͩͬͨ

    View full-size slide

  14. ͳͥ1)1
    w ҆қͳཧ༝ʹݟ࣮͑ͯ͸ॏཁͳͷͰ͸ʁ
    w ྲྀߦΛ௥͍͔͚ͳ͍
    w ݱ࣮తͳ໰୊Λղܾ͍ͨ͠ͷͰ͋ͬͯ

    ϞμϯͳݴޠΛۦ࢖͢Δ͜ͱΛ

    ໨తʹ͠ͳ͍

    View full-size slide

  15. ͳͥ1)1
    w 8PSE1SFTT͕1)1Ҏ֎ͷݴޠͰ࡞ΒΕͯ
    ͍ͨΒɺࠓ΄Ͳͷ੎͍͸ͳ͔ͬͨͷͰ͸
    w ਎ۙʹ໰୊ղܾ͍ͯ͠Δ͜ͱͷՁ஋Λ

    ΋ͬͱೝΊΑ͏

    View full-size slide

  16. 1)1ͷྑ͍ͱ͜Ζ
    w 8FCαʔόͰͷॲཧ͸े෼ʹߴ଎
    w ϝϧΧϦฏۉϨεϙϯελΠϜ͸ϛϦඵ୆
    w ؆୯ͳͷʹ࣮༻త
    w 1)1Λ஌Βͳ͍։ൃऀͰ΋ɺผͷݴޠ
    Λ஌͍ͬͯΕ͹͋ͬͱ͍͏ؒʹशಘ

    View full-size slide

  17. w ͨͩ͠8FCݴޠͰ͋ΔͨΊۤखͳ͜ͱ͸

    ͨ͘͞Μ͋Δ
    w ฒྻॲཧɺৗறϓϩηεɺFUD
    w ͦΕ͸ಘҙͳݴޠʹ೚ͤΔ

    View full-size slide

  18. w 1)1͚ͩͰ͢΂ͯΛ࡞Δ͜ͱʹ

    ͩ͜ΘΒͳ͍
    w 1)1͕ۤखͳॲཧ͸ɺ

    3VCZɺ1ZUIPOɺ(PͳͲ࢖͍͚ͬͯ͹0,

    View full-size slide

  19. ͲΜͳߟ͑ํͰ։ൃ͖͔ͯͨ͠

    View full-size slide

  20. Ұ൪େࣄͳ͜ͱʮεϐʔυʯ

    View full-size slide

  21. ϝϧΧϦ։ൃͷ੒௕ۂઢ




    ࠓ͜͜
    ໨ඪ
    ࣌ؒ
    ౸ୡ౓

    View full-size slide

  22. w ͜Ε·ͰͷϝϧΧϦ͸ˠͷஈ֊
    w ։ൃऀͷ໾ׂɺ։ൃͷߟ͑ํ͸

    ੒௕ஈ֊ʹΑͬͯมΘΔ
    w ˠͰҰ൪େࣄͳͷ͕εϐʔυ

    View full-size slide

  23. w ઌߦ͢Δڝ߹ޙ͔Β௥ͬͯ͘Δେࢿຊͷڝ߹
    w ϦϦʔε͢Δ·Ͱͷεϐʔυͱɺ

    ϦϦʔε͔ͯ͠ΒͷεϐʔυͰ

    ࠩΛ෇͚Δ͔͠ͳ͍
    w ૉૣ͘ग़ͯ͠ɺ୭͔ʹ࢖ͬͯ΋Βͬͯɺ

    Ձ஋ΛߴΊ͍ͯ͘
    ͳͥʮεϐʔυʯ͕େࣄͳͷ͔

    View full-size slide

  24. ͳͥʮεϐʔυʯ͕େࣄͳͷ͔
    w εϐʔυ͕େࣄͳ͜ͱ͸ΈΜͳ෼͔͍ͬͯΔ
    w ʮ΋ͬͱΏͬ͘Γ࡞Ε͹ྑ͔ͬͨʯ

    ͱ͍͏͜ͱ͸͋Γ͑ͳ͍

    View full-size slide

  25. w ஸೡʹ࡞ΒΕ͍ͯͯྑ͘Ͱ͖͍ͯΔ͚Ͳ

    ୭΋࢖͍ͬͯͳ͍αʔϏε
    ҙຯ͕ͳ͍ɻɻ
    ελʔτΞοϓͷੈքͰ͸ʣ

    View full-size slide

  26. ʮεϐʔυʯΛग़͢͜ͱͷ
    ೉͠͞

    View full-size slide

  27. ݶΒΕͨϦιʔεͰͲ͏࡞Δʁ
    w ։ൃऀɺ༧ࢉɺ࣌ؒ

    ͲΕ΋଍Γͳ͍ͷ͕;ͭ͏

    View full-size slide

  28. εϐʔυΛੜΈग़͢
    ͭͷߟ͑ํ

    View full-size slide

  29. ໎ͬͨΒ୯७ͳํΛબͿ

    View full-size slide

  30. ໎ͬͨΒ୯७ͳํΛબͿ
    w ٕज़બఆ͢Δͱ͖ʹΑ͋͘Δ࿩
    w ߴػೳ͚ͩͲෳࡶͳ΋ͷWT௿ػೳ͚ͩ
    Ͳ୯७ͳ΋ͷ
    w ྫɿߏ੒؅ཧπʔϧ$IFGWT"OTJCMF

    View full-size slide

  31. ໎ͬͨΒ୯७ͳํΛબͿ
    w Ͱ͖ΔݶΓ৘ใΛूΊͯ΋ܾΊΒΕͳ͍ͱ͖

    ʮ௿ػೳ͚ͩͲ୯७ͳ΋ͷʯΛબͿ
    w ୯७Ͱ͋Δ͜ͱֶशίετ͕௿͍΋ͷ͸

    ୹ظతʹ੒Ռ͕ग़Δ
    w ൒೥ʙ೥ઌͷϝϦοτΑΓ΋ࠓ͕େࣄ

    View full-size slide

  32. ࠷ߴͩͱࢥ͏΋ͷͷ

    ׂͰग़͢

    View full-size slide

  33. ࠷ߴͩͱࢥ͏΋ͷͷ

    ׂͰग़͢
    w ͍͔ͭ࢖ΘΕΔ͔΋͠Εͳ͍ίʔυΛ

    ࠓ४උ͓͍ͯͯ͠΋ʜ
    ेதീ۝࢖ΘΕͳ͍ɻɻ
    ݁ہɺ౤Լͨ࣌ؒ͠͸ճऩͰ͖ͣʣ

    View full-size slide

  34. ࠷ߴͩͱࢥ͏΋ͷͷ

    ׂͰग़͢
    w ͍ͭདྷΔ͔෼͔Βͳ͍ະདྷͷ͜ͱΑΓ΋ɺ

    ͙͢໨ͷલͷ੒ޭͷ΄͏͕ѹ౗తʹॏཁ
    w ໨ͷલͷ੒ޭ͕͋ͬͯ࢝Ίͯɺ

    কདྷΛݟӽͨ͠վળΛ͢Δҙຯ͕ग़ͯ͘Δ

    View full-size slide

  35. ࠷ߴͩͱࢥ͏΋ͷͷ

    ׂͰग़͢
    w ࠷ߴΛ໨ࢦ͢ͱɺ

    ͍ͭ·Ͱܦͬͯ΋ऴΘΒͳ͍
    w ׂͰग़ͯ͠ɺϢʔβͷ൓ԠΛݟΔ΂͖

    View full-size slide

  36. ࠷ߴͩͱࢥ͏΋ͷͷ

    ׂͰग़͢
    %POFJTCFUUFSUIBOQFSGFDU
    ׬ᘳΛ໨ࢦ͢ΑΓɺ·ͣऴΘΒͤΖ
    'BDFCPPLͷϞοτʔͷͻͱͭ

    View full-size slide

  37. ࠷ߴͩͱࢥ͏΋ͷͷ

    ׂͰग़͢
    ૣ͗͢Δ࠷దԽ͸ॾѱͷࠜݯ
    %&,OVUI
    w ࣅ͍ͯΔ֨ݴɾߟ͑ํ͕ͨ͘͞Μ͋Δ
    :"(/* :BL4IBWJOH

    View full-size slide

  38. ࠷΋ॏཁͳ͜ͱʹ
    ϑΥʔΧε͢Δ

    View full-size slide

  39. ࠷΋ॏཁͳ͜ͱʹ
    ϑΥʔΧε͢Δ
    w ϝϧΧϦͷ৔߹ɺϗʔϜը໘ʹදࣔ͞ΕΔ

    ঎඼ͷҰཡɺग़඼ߪೖͷૢ࡞
    w ਅͬઌʹ࡞Γ࢝Ίͯɺ

    Կ౓΋Կ౓΋࡞Γͳ͓͞Εͯચ࿅͞Εͨ

    View full-size slide

  40. ࠷΋ॏཁͳ͜ͱʹ
    ϑΥʔΧε͢Δ
    w ͋Δ෦෼ʹϑΥʔΧε͢Δͱ͍͏͜ͱ͸ɺ

    ୅ΘΓʹԿΛলུ͢Δ͔ͱ͍͏͜ͱ

    View full-size slide

  41. ࠷΋ॏཁͳ͜ͱʹ
    ϑΥʔΧε͢Δ
    w ΞϓϦެ։Λٸ͙ͨΊɺ

    ੝ΓࠐΉػೳΛݶք·Ͱߜͬͨ
    ެ։࣌ͷ"1*ͷ਺
    छྨ
    ݱࡏͷ਺
    छྨ ΄΅ഒ

    View full-size slide

  42. ࠷΋ॏཁͳ͜ͱʹ
    ϑΥʔΧε͢Δ
    w େ୾ʹলུͨ͜͠ͱɿ

    ެ։࣌ͷΠϯϑϥ
    w ͘͞ΒΠϯλʔωοτͷ

    ߴੑೳͳઐ༻αʔό୆ʹ͢΂ͯ٧ΊࠐΈ

    View full-size slide

  43. ࠷΋ॏཁͳ͜ͱʹ
    ϑΥʔΧε͢Δ
    w ຊ൪؀ڥΛ೔ͰߏஙͰ͖ͨ
    w ҆Ձˍखؒ͸ͳ͔ͬͨ΋ͷͷɺ

    ϲ݄Ͱෛՙͷݶքʹ
    w ͔͠͠ɺΠϯϑϥ४උظ͕ؒݮͬͨ͜ͱ͸ɺ

    ݎ࿚ͳΠϯϑϥΛ࠷ॳ͔Β४උ͢ΔΑΓ

    ͣͬͱՁ஋͕͋Δ͜ͱͩͬͨ

    View full-size slide

  44. εϐʔυͷͨΊʹ

    ͢΂ͯΛࣺͯͳ͍Α͏ʹؾΛ͚ͭΔ

    View full-size slide

  45. ςετʹ͍ͭͯ
    w ςετ͸লུ͗͢͠ͳ͍
    w 1)16OJUͰͲΜͳςετΛॻ͔͘
    w අ༻ରޮՌͷߴ͍ςετΛॻ͘

    View full-size slide

  46. අ༻ରޮՌͷߴ͍ςετ
    w ։ൃऀͷηϯε͕໰ΘΕΔɻɻ
    w ະདྷͷ։ൃऀ ࣗ෼ࣗ਎΋ؚΉ
    ͕

    ͲΕ͚ͩٹ͑Δ͔
    w ΧόϨοδॏࢹͰ͸ͳ͘

    ΤϯυπʔΤϯυͰਖ਼͠͞Λςετ͢Δ

    View full-size slide

  47. අ༻ରޮՌͷߴ͍ςετ
    w ΤϯυπʔΤϯυͷςετ͕͋Ε͹ɺ

    ҆৺ͯ͠ݩίʔυΛେ୾ʹมߋͰ͖Δ
    w ༏Εͨςετ͕͋Ε͹ɺ

    εϐʔυͷͨΊʹίʔυ඼࣭͕٘ਜ਼ʹͳͬͯ΋

    ڐ༰Ͱ͖Δ

    View full-size slide

  48. ·ͱΊ
    w 1)1Ͱૉૣ͘ɺϋΠύϑΥʔϚϯεʹɺ

    εέʔϧ͢ΔαʔϏεΛ࡞ΕΔ
    w ࣗ৴Λ΋ͬͯ1)1ͰϓϩμΫτΛ࡞Γ·
    ͠ΐ͏ʂ

    View full-size slide

  49. w ·ͨ೥ޙɺ1)1ίϛϡχςΟʹ

    ϑΟʔυόοΫͰ͖ΔΑ͏ʹؤுΓ·͢
    ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠

    View full-size slide