Slide 1

Slide 1 text

Wo rd P re s s w i t h M i c ro s e r v i c e s Wo rd C a m p K a n s a i 2 0 1 6

Slide 2

Slide 2 text

Ta l k a b o u t … • Why Microservices ? • Example Case • How to building Microservices ? • Conclusion

Slide 3

Slide 3 text

H i d e t a k a O k a m o t o • Digitalcube developer • WordBenchژ౎ϞσϨʔλ WP REST API / WP - CLIɹɹ ίΞίϯτϦϏϡʔλʔ • WP/React/AWS SDK/Alexa

Slide 4

Slide 4 text

A W S + Wo rd P re s s = > A M I M O T O A M I h t t p s : / / a m i m o t o - a m i . c o m /

Slide 5

Slide 5 text

Ta l k a b o u t … • Why Microservices ? • Example Case • How to building Microservices ? • Conclusion

Slide 6

Slide 6 text

T h i n k a b o u t …

Slide 7

Slide 7 text

ʮ ࢲ ͕ ٳ Ή ͱ ɺ ɹ ࢓ ࣄ ͕ · Θ Β ͳ ͍ ʯ

Slide 8

Slide 8 text

ʮ ࢲ ͕ ٳ Ή ͱ ɺ ɹ ࢓ ࣄ ͕ · Θ Β ͳ ͍ ʯ ີ݁߹ʢMonolithicʣͳνʔϜ

Slide 9

Slide 9 text

W H Y ? • ͦͷਓ͕͍ͳ͍ͱػೳ͠ͳ͍Օॴ͕͋Δ ɹˠͦͷਓ͕͍ͳ͘ͳͬͨΒػೳෆશʹؕΔ • ͋ͳͨͷձࣾʹ ɹʮ͍ͳ͘ͳΔͱۀ຿͕ࢭ·Δਓʯ͸͍·ͤΜ͔ʁ

Slide 10

Slide 10 text

T h i n k a b o u t …

Slide 11

Slide 11 text

ʮ ͜ ͷ α ʔόʔ ͕ ࢭ · Δ ͱ ɺ ɹ α ʔ Ϗ ε ͕ ࢭ · Δ ʯ

Slide 12

Slide 12 text

S i n g l e P o i n t O f F a i l u re ୯ Ұ ো ֐ ఺

Slide 13

Slide 13 text

ྫ ͑ ͹ ɺ ͜ Μ ͳ ߏ ੒

Slide 14

Slide 14 text

̍ Օ ॴ ͷ ো ֐ Ͱ αΠ τ ͕ શ ͯ μ ΢ ϯ ͢ Δ ×

Slide 15

Slide 15 text

B u i l d i n g M i c ro s e r v i c e s

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

ί ϯ ς ϯ π ؅ ཧ

Slide 18

Slide 18 text

Ϛʔ έ ς Ο ϯ ά

Slide 19

Slide 19 text

σ ʔ λ ݕ ࡧ

Slide 20

Slide 20 text

α ʔό ϩ ά ऩ ू

Slide 21

Slide 21 text

α ʔό ϩ ά ղ ੳ

Slide 22

Slide 22 text

Ϗ δϡ Ξ ϥ Π ζ

Slide 23

Slide 23 text

ෳ ਺ ͷ Ξ ϓ Ϧ Λ ૊ Έ ߹ Θ ͤ ͯ α ʔ Ϗ ε ʹ ͢ Δ

Slide 24

Slide 24 text

ো ֐ ͕ α ʔ Ϗ ε શ ମ ʹ ೾ ٴ ͠ ʹ͘͘ ͳ Δ ×

Slide 25

Slide 25 text

ো ֐ ͕ α ʔ Ϗ ε શ ମ ʹ ೾ ٴ ͠ ʹ͘͘ ͳ Δ × Ϛʔ έ ς Ο ϯ ά ػ ೳ ͩ ͚ ఀ ࢭ

Slide 26

Slide 26 text

W h y M i c ro s e r v i c e ? • εέʔϧʢ֦ுʣ͠΍͘͢ɺμ΢ϯ͠ʹ͍͘ • ಛఆͷٕज़΁ͷґଘ͕খ͘͞ͳΔ • σϓϩΠ͠΍͘͢ɺΞοϓσʔτΛසൟʹͰ͖Δ

Slide 27

Slide 27 text

εέ ʔϧ ͱ མ ͪ ʹ͘ ͞ • αʔϏεಉ͕࢜ૄ݁߹ • མͪͨαʔϏεΛ੾Γ཭͢ • ػೳ͸ݮΔ͕ɺαʔϏεΛ མͱ͞ͳ͍ • ඞཁͳαʔϏε͚ͩɺɹɹ εέʔϧͤ͞Δ ×

Slide 28

Slide 28 text

ಛ ఆ ٕ ज़ ΁ ͷ ґ ଘ Λ ճ ආ • αʔϏεಉ͕࢜ૄ݁߹ɹɹ ˠϓϩάϥϜ͕ಠཱՔಇ • ॲཧɾαʔϏεʹ࠷దͳɹ ݴޠɾFW͕બ୒Մೳ • ඞཁʹԠͯ͡ɹɹɹɹɹɹ αʔϏε୯ҐͰϦϓϨΠε s y m f o n y J S J a v a Wo rd P re s s

Slide 29

Slide 29 text

͋ · Γ ߋ ৽ ͠ ͳ ͍ ස ൟ ʹ Ξ ο ϓ σ ʔ τ খ ͞ ͘ ස ൟ ͳ Ξ οϓ σ ʔ τ • αʔϏε୯ҐͰͷσϓϩΠ • มߋͷӨڹ͕શମ͔Βɹɹ αʔϏε୯Ґʹ • όʔδϣχϯά͞ΕͨAPI • ςετͷࣗಈԽͰΑΓߴ଎ɾ ߴස౓ͳσϓϩΠ͕Մೳʹ

Slide 30

Slide 30 text

খ ͞ ͘ ස ൟ ͳ Ξ οϓ σ ʔ τ • αʔϏε୯ҐͰͷσϓϩΠ • มߋͷӨڹ͕શମ͔Βɹɹ αʔϏε୯Ґʹ • όʔδϣχϯά͞ΕͨAPI • ςετͷࣗಈԽͰΑΓߴ଎ɾ ߴස౓ͳσϓϩΠ͕Մೳʹ 7 "1*αʔϏε

Slide 31

Slide 31 text

খ ͞ ͘ ස ൟ ͳ Ξ οϓ σ ʔ τ • αʔϏε୯ҐͰͷσϓϩΠ • มߋͷӨڹ͕શମ͔Βɹɹ αʔϏε୯Ґʹ • όʔδϣχϯά͞ΕͨAPI • ςετͷࣗಈԽͰΑΓߴ଎ɾ ߴස౓ͳσϓϩΠ͕Մೳʹ 7 7 "1*αʔϏε

Slide 32

Slide 32 text

খ ͞ ͘ ස ൟ ͳ Ξ οϓ σ ʔ τ • αʔϏε୯ҐͰͷσϓϩΠ • มߋͷӨڹ͕શମ͔Βɹɹ αʔϏε୯Ґʹ • όʔδϣχϯά͞ΕͨAPI • ςετͷࣗಈԽͰΑΓߴ଎ɾ ߴස౓ͳσϓϩΠ͕Մೳʹ 7 7 "1*αʔϏε

Slide 33

Slide 33 text

Ta l k a b o u t … • Why Microservices ? • Example Case • How to building Microservices ? • Conclusion

Slide 34

Slide 34 text

̏ छ ྨ ͷ Ξ ϓ ϩ ʔ ν • ֎෦αʔϏεͱͷ࿈ܞ • ΠϯϑϥϨΠϠͷ෼ׂ • WordPress as a Microservices

Slide 35

Slide 35 text

̏ छ ྨ ͷ Ξ ϓ ϩ ʔ ν • ֎෦αʔϏεͱͷ࿈ܞ • ΠϯϑϥϨΠϠͷ෼ׂ • WordPress as a Microservices

Slide 36

Slide 36 text

ಛ ఆ ͷ ػ ೳ Λ ଞ ͷ α ʔ Ϗ ε Ͱ ࣮ ૷ ͢ Δ

Slide 37

Slide 37 text

֎ ෦ α ʔ Ϗ ε ͷ A P I ʹ ର ͯ͠ɺ w p _ re m o t e _ g e t ( ) ; w p _ re m o t e _ p o s t ( ) ; ͳ Ͳ Ͱ ઀ ଓ ͢ Δ

Slide 38

Slide 38 text

̏ छ ྨ ͷ Ξ ϓ ϩ ʔ ν • ֎෦αʔϏεͱͷ࿈ܞ • ΠϯϑϥϨΠϠͷ෼ׂ • WordPress as a Microservices

Slide 39

Slide 39 text

h t t p s : / / a w s . a m a z o n . c o m / m a r k e t p l a c e / p p / B 0 1 B 3 Z E 1 N C RDB΍ϝσΟΞετϨʔδΛ AWS͕Ϛωʔδυ͢ΔαʔϏεʹҠৡ

Slide 40

Slide 40 text

h t t p s : / / a w s . a m a z o n . c o m / m a r k e t p l a c e / p p / B 0 1 B 3 Z E 1 N C RDB΍ϝσΟΞετϨʔδΛ AWS͕Ϛωʔδυ͢ΔαʔϏεʹҠৡ ϝ ϯ ς φ ϯε Λ AW S ͕ ࣮ ࢪ ϝ ϯ ς φ ϯε Λ AW S ͕ ࣮ ࢪ ϝ ϯ ς φ ϯε Λ AW S ͕ ࣮ ࢪ ϝ ϯ ς φ ϯε Λ AW S ͕ ࣮ ࢪ

Slide 41

Slide 41 text

ϑΝΠϧɾσʔλΛ֎෦Խ͢Δ͜ͱͰɺ αʔόʔͷࣗಈεέʔϧΞ΢τ͕Մೳʹ

Slide 42

Slide 42 text

h t t p : / / j a . s t a t i c p re s s . n e t / StaticPressʹΑΔwp-adminͱ ϑϩϯτΤϯυͷ෼཭

Slide 43

Slide 43 text

StaticPressʹΑΔwp-adminͱ ϑϩϯτΤϯυͷ෼཭

Slide 44

Slide 44 text

̏ छ ྨ ͷ Ξ ϓ ϩ ʔ ν • ֎෦αʔϏεͱͷ࿈ܞ • ΠϯϑϥϨΠϠͷ෼ׂ • WordPress as a Microservices

Slide 45

Slide 45 text

h t t p s : / / a m i m o t o - a m i . c o m / a m i m o t o - n i n j a / Ի੠ೝࣝαʔϏεͱͷ࿈ܞ

Slide 46

Slide 46 text

A u d i o C a p t u re A u d i o P l a y b a c k Yo u r C o d e a n o t h e r A P I W h a t i s Wo rd p re s s ? Wo rd P re s s i s …

Slide 47

Slide 47 text

h t t p s : / / g i t h u b . c o m / w c - a p p / w c - a p p Cordova΍React NativeΛ༻͍ͨ ωΠςΟϒΞϓϦ

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Ta l k a b o u t … • Why Microservices ? • Example Case • How to building Microservices ? • Conclusion

Slide 50

Slide 50 text

M i c ro s e r v i c e Ξ ϯ νύ λ ʔϯ ͸͡Ί͔Β Microserviceͱͯ͠ ߏங͠Α͏ͱ͢Δ

Slide 51

Slide 51 text

ε λ ʔ τ ͸ Ұ ຕ ؠ • ελʔτ͸γϯϓϧ͔ͭখ͘͞ • ͸͡Ί͔Βෳࡶͳߏ੒ʹ͢Δͱมߋίετ͕ߴ͘ͳΔ • γϯϓϧʹ͸͡ΊɺඞཁʹԠͯ͡෼ׂ͢Δ

Slide 52

Slide 52 text

͍ ͭ ෼ ׂ ͢΂ ͖ ͔ʁ • ίʔυͷ؅ཧ͕Ͱ͖ͳ͘ͳΔ·ͰංେԽͨ࣌͠ • Ұ෦ͷػೳͷΈසൟʹΞοϓσʔτ͍ͨ࣌͠ • ։ൃνʔϜ͕෺ཧతʹ཭Ε͍ͯΔ࣌ • ηΩϡϦςΟΛڧݻʹ͍ͨ͠෦෼͕Ͱ͖ͨ࣌ • ଞͷݴޠɾϑϨʔϜϫʔΫΛ࢖༻͍ͨ࣌͠

Slide 53

Slide 53 text

H o w t o M i c ro s e r v i c e ? • Ϗδωε୯ҐͰ෼ׂʢίϯ΢ΣΠͷ๏ଇʣ • ີ݁߹͔Βૄ݁߹΁ʢAPIϕʔεͰͷߏஙʣ • αʔϏεͷ؂ࢹͱো֐ͷ෼཭

Slide 54

Slide 54 text

ί ϯ ΢ Σ Π ͷ ๏ ଇ

Slide 55

Slide 55 text

– M E LV I N C O N WAY “γεςϜΛઃܭ͢Δ૊৫͸ɺ ͦͷߏ଄Λͦͬ͘Γ·Ͷͨߏ଄ͷ ઃܭΛੜΈग़ͯ͠͠·͏”

Slide 56

Slide 56 text

ί ϯ ΢ Σ Π ͷ ๏ ଇ • ີ݁߹ͳ૊৫͸ɺີ݁߹ͳγεςϜΛઃܭ͠΍͍͢ • ϓϩδΣΫτɾػೳ୯ҐͷνʔϜͰ։ൃ͢Δͱɺɹɹ ૄ݁߹ʹͳΓ΍͍͢ • ʮ̎ຕͷϐβͰ଍Γͳ͍νʔϜ͸࡞Δ΂͖Ͱͳ͍ʯ (Amazon)

Slide 57

Slide 57 text

A P I ϕʔε ͷ ։ ൃ

Slide 58

Slide 58 text

A P I ϕʔε ͷ ։ ൃ • αʔϏεຖʹಠཱͨ͠ΞϓϦͱͯ͠։ൃ • APIΛ༻͍ͯ֎෦ͱ࿈ܞ͢Δ • APIͷΤϯυϙΠϯτ͸όʔδϣχϯά͠ɺɹɹɹɹ ഁյతͳΞοϓσʔτʹඋ͑Δɹɹɹɹɹɹɹɹɹɹ ྫɿʮ/v1/coupons/ʯʮ /v2/wp/postsʯ

Slide 59

Slide 59 text

α ʔ Ϗ ε ͷ ؂ ࢹ ͱ ো ֐ ͷ ෼ ཭

Slide 60

Slide 60 text

Ͳͷ α ʔ Ϗ ε ͕ ࢭ · ͬͯ ͍ Δ ͔ Λ ஌ Δ ඞ ཁ ͕ ͋ Δ ×

Slide 61

Slide 61 text

α ʔ Ϗ ε ؂ ࢹ ͱ ো ֐ ͷ ෼ ཭ • αʔϏε୯ҐɾΞϓϦશମͰࢮ׆؂ࢹ • ো֐ͷى͖ͨαʔϏεҎ֎ͰՔಇ͢Δ࢓૊Έͷߏங • APIϦΫΤετͷλΠϜΞ΢τʹΑΔ஗Ԇʹ΋උ͑Δ

Slide 62

Slide 62 text

R O U T E 5 3 Λ ༻ ͍ ͨ ϑ Σ Πϧ Φ ʔόʔ α ʔό ো ֐ ࣌ ͸ S 3 ʹ ϧ ʔ ς Ο ϯ ά

Slide 63

Slide 63 text

Ta l k a b o u t … • Why Microservices ? • Example Case • How to building Microservices ? • Conclusion

Slide 64

Slide 64 text

ै དྷ ͷ Wo rd P re s s ߏ ங 8PSE1SFTT$PSF 1MVHJO 1MVHJO 1MVHJO 5IFNF 1MVHJO

Slide 65

Slide 65 text

ै དྷ ͷ Wo rd P re s s ߏ ங ͸ Ұ ຕ ؠ ʹ ͳ Γ ΍ ͢ ͍ 8PSE1SFTT$PSF 1MVHJO 1MVHJO 1MVHJO 5IFNF 1MVHJO 1MVHJO $IJME 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO

Slide 66

Slide 66 text

ϓϥάΠϯɾςʔϚͷিಥ͕ൃੜ͢Δͱɾɾɾ 8PSE1SFTT$PSF 1MVHJO 1MVHJO 1MVHJO 5IFNF 1MVHJO 1MVHJO $IJME 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

ཛ Λ ̍ ͭ ͷ Χ ΰ ʹ · ͱ Ί Δ ͱ ɺ ͦ ͷ Χ ΰ Λ མ ͱ ͠ ͨ ࣌ ʹ શ ໓ ͢ Δ

Slide 69

Slide 69 text

+BWB4DSJQU ػ ೳ ͸ ݮ Δ ͕ ɺ શ ମ ͸ ੜ ͖ ࢒ Δ )5.- "1* "1* "1* ×

Slide 70

Slide 70 text

ʮ ઈ ର ʹ མ ͱ ͞ ͳ ͍ Α ͏ ʹ ؤ ு Δ ʯ Ͱ ͸ ͳ ͘ ɺ ʮ ো ֐ ͕ ى ͖ ͯ ΋ શ ໓ ͞ ͤ ͳ ͍ ʯ

Slide 71

Slide 71 text

https://ja.wikipedia.org/wiki/%E8%88%AA%E7%A9%BA%E6%A9%9F#/media/File:Qantas_a380_vh-oqa_takeoff_heathrow_arp.jpg

Slide 72

Slide 72 text

https://ja.wikipedia.org/wiki/%E8%88%AA%E7%A9%BA%E6%A9%9F#/media/File:Qantas_a380_vh-oqa_takeoff_heathrow_arp.jpg ΋ ͠ Τ ϯ δ ϯ ͕ ࢭ · ͬ ͨ Β ʁ

Slide 73

Slide 73 text

ϥϜ Τ Ξ λ ʔ Ϗ ϯ • ඈߦػͷΤϯδϯ͕ࢭ·Δ ͱىಈ͢Δ෩ྗൃిػ • ඈߦܭثͷిྗΛ֬อ͢Δ • Ͳ͔͜ʹো֐͕ى͖ͯ΋ɺ ઈରʹඞཁͳ෺͸֬อ͢Δ https://ja.wikipedia.org/wiki/%E3%83%A9%E3%83%A0%E3%82%A8%E3%82%A2%E3%83%BB%E3%82%BF%E3%83%BC%E3%83%93%E3%83%B3#/media/File:757_ram_air_turbine.jpg

Slide 74

Slide 74 text

ʮ ઈ ର ʹ མ ͱ ͞ ͳ ͍ Α ͏ ʹ ؤ ு Δ ʯ ͔ Β ʮ ো ֐ ͕ ى ͖ ͯ ΋ શ ໓ ͞ ͤ ͳ ͍ ʯ

Slide 75

Slide 75 text

T H A N K S ! • Why Microservices ? • Example Case • How to building Microservices ? • Conclusion