Slide 1

Slide 1 text

*46$0/Ͱ༧બམͪͨ͠ͷͰɺ 4XPPMFʢFBTZTXPPMFʣͰॻ͖׵ ͑ͯɺײ૝ઓͰϕϯν૸ΒͤͯΈͨ࿩ גࣜձࣾαΠόʔΤʔδΣϯτɹനҪɹӳ QIQDPOQIQDPO

Slide 2

Slide 2 text

• גࣜձࣾαΠόʔΤʔδΣϯτ • 4(&౷ׅຊ෦ٕज़౷ׅࣨࣨ௕ • ࢠձࣾࣾ$50 • גࣜձࣾ$SBGU&HH • גࣜձࣾδʔΫϨετ • גࣜձࣾαϜβοϓ • നҪɹӳ • ΤϯδχΞ • #MPH IUUQBNFCMPKQHPPEPP ͓લɺ୭Α • 5XJUUFS !HPPEPP • %2 ͙ͪ͢Ή '# ϓΫϦϙ ཱྀܳਓ

Slide 3

Slide 3 text

"HFOEB w*46$0/ͱ͸ w4XPPMFͱ͸ wFBTZTXPPMFͱ͸ w4MJNFBTZTXPPMF wϕϯνϚʔΫͷ݁Ռ͸೗Կʹʂ

Slide 4

Slide 4 text

*46$0/ͱ͸

Slide 5

Slide 5 text

͓୊ͱͳΔ8FCαʔϏεΛܾΊΒΕͨϨΪϡ ϨʔγϣϯͷதͰݶք·Ͱߴ଎ԽΛਤΔνϡʔ χϯάότϧɺͦΕ͕*46$0/Ͱ͢ɻաڈͷ ࣮੷΋ॴଐ͍ͯ͠Δձࣾ΋શؔ͘܎ͳ͍ɺ݁Ռ ͕શͯͷΨνϯίότϧͰ͢ ˞ެࣜαΠτ͔ΒͷҾ༻ɿIUUQJTVDPOOFUBSDIJWFTIUNM ೥͸ୈ̔ճ໨

Slide 6

Slide 6 text

ࠓ೥ͷ༧બ݁ՌҰཡ

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

λΠτϧʹ༧બམͪͬͯ ॻ͍ͯ͋Δͷʹʂʁ

Slide 9

Slide 9 text

ʢυϥΫΤͷϓϨΠϠʔ໊Λି͠·ͨ͠ʣ ˞ࢲͷνʔϜ͸༧બམͪͰͨ͠ɾɾɾ ಉ྅ͷνʔϜͰͨ͠

Slide 10

Slide 10 text

٢ใ ˞༧બऴྃ೔͔Β໿̍िؒ

Slide 11

Slide 11 text

Ϧϕϯδ

Slide 12

Slide 12 text

4XPPMFʹνϟϨϯδ͠Α͏

Slide 13

Slide 13 text

4XPPMFͱ͸

Slide 14

Slide 14 text

1)1ͰΠϕϯτۦಈͷඇಉظ ˍίϧʔνϯϕʔεͷฒߦॲཧ

Slide 15

Slide 15 text

1)1FS,JBHJͷV[VMMB͞ΜͷൃදͰ஌Γ·ͨ͠ https://speakerdeck.com/uzulla/da-tong-php

Slide 16

Slide 16 text

FBTZXPPMFͱ͸

Slide 17

Slide 17 text

(JUIVCΑΓ https://github.com/easy-swoole/easyswoole

Slide 18

Slide 18 text

FBTZTXPPMF͸ɺ4XPPMF4FSWFS Λϕʔεͱͨ͠ৗறܕϝϞϦϕʔεͷ ෼ࢄ1)1ϑϨʔϜϫʔΫ https://speakerdeck.com/uzulla/zui-jin-meruhuomukaitenaimeruhuomaniyoru-tiyotutodakebian-watuta-ying- phpfalsemeruhuomu-falseohua-fu-ti-zui-jin-swoolegatafalsesiidesu V[VMMB͞Μ͕͜ͷ εϥΠυͰΊͬͪΌ ղઆͯ͘͠Εͯ·͢

Slide 19

Slide 19 text

FBTZTXPPMF͸ 4XPPMFΛ͔͓ͭͬͨखܰͳ ϑϨʔϜϫʔΫʂ ҙ༁ʣ

Slide 20

Slide 20 text

1)1Ͱ΋ Πϕϯτۦಈͷඇಉظˍ ίϧʔνϯϕʔεͷฒߦ ॲཧΛ ͓खܰʹ࣮ݱʂ

Slide 21

Slide 21 text

FBTZTXPPMFͰ *46$0/ Ϧϕϯδ ˞FBTZTXPPMFW͸Ͱ͍ͯ·͕͢ɺࠓճ͸WΛ༻͍ͨ࿩Ͱ͢

Slide 22

Slide 22 text

4MJN FBTZTXPPMF

Slide 23

Slide 23 text

*46$0/ͷ1)1ͷ ॳظ࣮૷͸ 4MJNΛ࠾༻

Slide 24

Slide 24 text

جຊϑΝΠϧʹ ͢΂ͯͷϩδοΫΛ ॻ͍͍ͯΔ *46$0/ॳظ࣮૷ͷ࢓༷

Slide 25

Slide 25 text

FBTZTXPPMFͰ ॻ͖׵͑Δ࣌΋ ౿ऻ͠Α͏ʂ ͋ͱͰؒҧʹؾͮ͘ʣ

Slide 26

Slide 26 text

FBTZTXPPMFͷϑΥϧμߏ੒ Project        ルートディレクトリ  ├ App         App Class │ └ HttpController  │   ├ Index.php  コントローラ │   └ Router.php カスタムルーティング ├ Config.php     設定 ├ EasySwooleEvent.php イベント └ easyswoole     easyswooleコマンド ˞FBTZTXPPMFWͷߏ੒

Slide 27

Slide 27 text

௨ৗͷίϯτϩʔϥʔͷϚοϐϯά • /{クラス名}/{メソッド名}みたいな形 例) • /api/users�-> \App\HttpController\Api::users() • /admin/api/actions/login 
 -> \App\HttpController\Admin\Api\Action::login() ˣ ̍ϑΝΠϧʹͰ͖ͳ͍ͷͰ 3PVUFSQIQΛ͔ͭ͏

Slide 28

Slide 28 text

3PVUFSQIQͷྫ FBTZTXPPMF 4MJNͩͱ

Slide 29

Slide 29 text

ॻ͖׵͕͑୯७࡞ۀͰ ͍͚ͦ͏ʂ

Slide 30

Slide 30 text

͕ɺ໰୊ൃੜʂ ͦͷ̍ʣ

Slide 31

Slide 31 text

3PVUFSQIQ͸$POUSPMMFSΛܧঝͯ͠ ͍ͳ͍ͷͰ4FTTJPO͕ਖ਼͘͠ѻ͑ͳ͍ શһಉ͡ηογϣϯʹͳͬͪΌ͏

Slide 32

Slide 32 text

ϑΝΠϧΛஅ೦ͯ͠ ඪ४ͷίϯτϩʔϥͷ ߏ੒Λ࢖͏͜ͱʹ   App           └ HttpController      ├ Admin     │ └ Api     │  └ Events     │   └ Index.php     ├ Api     │ └ Events     │  └ Index.php     └ Index.php ͜Μͳײ͡

Slide 33

Slide 33 text

͕ɺ໰୊ൃੜʂ ͦͷʣ

Slide 34

Slide 34 text

FBTZTXPPMFͰఏڙ͞Ε͍ͯΔTFTTJPO ΫϥεʹEFMFUFϝιου͕ͳ͍ ݩͷ*46$0/ͷ࣮૷ʹEFMFUF͕͋ͬͨ

Slide 35

Slide 35 text

ͭͬͨ͘

Slide 36

Slide 36 text

͕ɺ໰୊ൃੜʂ ͦͷʣ

Slide 37

Slide 37 text

%#ʹCFHJO͕ Ͱ͖ͳ͍ FBTZTXPPMFͰఏڙ͞Ε͍ͯΔ .Z42-ͷϥούʔʹτϥϯβΫ γϣϯ͕࣮૷͞Ε͍ͯͳ͍ʂ ( )

Slide 38

Slide 38 text

ͭͬͨ͘

Slide 39

Slide 39 text

ឯ༨ۂંΛܦͯ

Slide 40

Slide 40 text

͍ͭʹಈ͍ͨ

Slide 41

Slide 41 text

ϕϯνϚʔΫͷ ݁Ռ͸೗Կʹʂ

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

ࢀߟ4MJN̏ͷॳظείΞ໿

Slide 46

Slide 46 text

ॳظ࣮૷ͷϕϯν ͳΜͯ০ΓͰ͢ʂ Ғ͍ਓʹ͸ɺͦΕ͕ ղΒΜͷͰ͢Αʂ

Slide 47

Slide 47 text

ࠓճ͸ॳظ࣮૷ͷ4MJNΛ FBTZTXPPMFʹ ׬શҠ২ͯ͠ϕϯνΛ ྲྀͨ͠ͱ͜Ζ·Ͱʂ https://github.com/shirai-suguru/isucon8-easyswoole ؾʹͳΔํ͸ͪ͜ΒΛ

Slide 48

Slide 48 text

4XPPMFʹ࠷దͳॻ͖׵͑·Ͱ͸ Ͱ͖ͳ͔ͬͨ ͨͩ͠ɺࠓ೥ͷ*46$0/ͷ໰୊ͷ ੑ্࣭ɺඇಉظॲཧͰ༗རʹͳΔͱ ͜Ζ͸΄΅ͳ͍ɾɾɾ

Slide 49

Slide 49 text

དྷ೥Ϧϕϯδ

Slide 50

Slide 50 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠