Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WordPress with Microservice Architecture
Search
Hidetaka Okamoto
July 10, 2016
Technology
1
3.5k
WordPress with Microservice Architecture
WordCamp Kansai 2016セッション資料
Hidetaka Okamoto
July 10, 2016
Tweet
Share
More Decks by Hidetaka Okamoto
See All by Hidetaka Okamoto
OpenAI APIで API Changelogを要約してみた話 / chatgpt-osaka-1
hideokamoto
0
480
コミュニティ運営から 中の人に変わって感じたこと
hideokamoto
0
57
Developerが Developer Advocateになった話 / dev-rel-meetup-tokyo-71
hideokamoto
0
280
Jamstack開発者のための App Runner入門
hideokamoto
1
430
WordPressでの webサイト制作2022 / ngk2022s
hideokamoto
0
390
JavaScript(TypeScript)で メディアサイトを インフラから構築する方法 / jsconf-jp-2021
hideokamoto
2
4.1k
AWS上でStripeを利用したアプリをより安全にデプロイする方法 /jaws-pankration-2021
hideokamoto
1
170
Shifter Headlessと Headless WordPressの紹介
hideokamoto
0
1.7k
Stripe & Next.js + AWS Amplify で会員 + 定期課金機能 / JP_Stripes20210903
hideokamoto
7
3k
Other Decks in Technology
See All in Technology
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
120
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
200
.NET 9 のパフォーマンス改善
nenonaninu
0
900
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
450
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
540
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
530
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
180
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Fireside Chat
paigeccino
34
3.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
A designer walks into a library…
pauljervisheath
204
24k
Docker and Python
trallard
42
3.1k
Transcript
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
Ta l k a b o u t … •
Why Microservices ? • Example Case • How to building Microservices ? • Conclusion
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
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 /
Ta l k a b o u t … •
Why Microservices ? • Example Case • How to building Microservices ? • Conclusion
T h i n k a b o u t
…
ʮ ࢲ ͕ ٳ Ή ͱ ɺ ɹ ࣄ
͕ · Θ Β ͳ ͍ ʯ
ʮ ࢲ ͕ ٳ Ή ͱ ɺ ɹ ࣄ
͕ · Θ Β ͳ ͍ ʯ ີ݁߹ʢMonolithicʣͳνʔϜ
W H Y ? • ͦͷਓ͕͍ͳ͍ͱػೳ͠ͳ͍Օॴ͕͋Δ ɹˠͦͷਓ͕͍ͳ͘ͳͬͨΒػೳෆશʹؕΔ • ͋ͳͨͷձࣾʹ ɹʮ͍ͳ͘ͳΔͱۀ͕ࢭ·Δਓʯ͍·ͤΜ͔ʁ
T h i n k a b o u t
…
ʮ ͜ ͷ α ʔόʔ ͕ ࢭ · Δ ͱ
ɺ ɹ α ʔ Ϗ ε ͕ ࢭ · Δ ʯ
S i n g l e P o i n
t O f F a i l u re ୯ Ұ ো
ྫ ͑ ɺ ͜ Μ ͳ ߏ
̍ Օ ॴ ͷ ো Ͱ αΠ τ ͕
શ ͯ μ ϯ ͢ Δ ×
B u i l d i n g M i
c ro s e r v i c e s
None
ί ϯ ς ϯ π ཧ
Ϛʔ έ ς Ο ϯ ά
σ ʔ λ ݕ ࡧ
α ʔό ϩ ά ऩ ू
α ʔό ϩ ά ղ ੳ
Ϗ δϡ Ξ ϥ Π ζ
ෳ ͷ Ξ ϓ Ϧ Λ Έ ߹
Θ ͤ ͯ α ʔ Ϗ ε ʹ ͢ Δ
ো ͕ α ʔ Ϗ ε શ ମ ʹ
ٴ ͠ ʹ͘͘ ͳ Δ ×
ো ͕ α ʔ Ϗ ε શ ମ ʹ
ٴ ͠ ʹ͘͘ ͳ Δ × Ϛʔ έ ς Ο ϯ ά ػ ೳ ͩ ͚ ఀ ࢭ
W h y M i c ro s e r
v i c e ? • εέʔϧʢ֦ுʣ͘͢͠ɺμϯ͠ʹ͍͘ • ಛఆͷٕज़ͷґଘ͕খ͘͞ͳΔ • σϓϩΠ͘͢͠ɺΞοϓσʔτΛසൟʹͰ͖Δ
εέ ʔϧ ͱ མ ͪ ʹ͘ ͞ • αʔϏεಉ͕࢜ૄ݁߹ •
མͪͨαʔϏεΛΓ͢ • ػೳݮΔ͕ɺαʔϏεΛ མͱ͞ͳ͍ • ඞཁͳαʔϏε͚ͩɺɹɹ εέʔϧͤ͞Δ ×
ಛ ఆ ٕ ज़ ͷ ґ ଘ Λ ճ
ආ • αʔϏεಉ͕࢜ૄ݁߹ɹɹ ˠϓϩάϥϜ͕ಠཱՔಇ • ॲཧɾαʔϏεʹ࠷దͳɹ ݴޠɾFW͕બՄೳ • ඞཁʹԠͯ͡ɹɹɹɹɹɹ αʔϏε୯ҐͰϦϓϨΠε s y m f o n y J S J a v a Wo rd P re s s
͋ · Γ ߋ ৽ ͠ ͳ ͍ ස ൟ
ʹ Ξ ο ϓ σ ʔ τ খ ͞ ͘ ස ൟ ͳ Ξ οϓ σ ʔ τ • αʔϏε୯ҐͰͷσϓϩΠ • มߋͷӨڹ͕શମ͔Βɹɹ αʔϏε୯Ґʹ • όʔδϣχϯά͞ΕͨAPI • ςετͷࣗಈԽͰΑΓߴɾ ߴසͳσϓϩΠ͕Մೳʹ
খ ͞ ͘ ස ൟ ͳ Ξ οϓ σ ʔ
τ • αʔϏε୯ҐͰͷσϓϩΠ • มߋͷӨڹ͕શମ͔Βɹɹ αʔϏε୯Ґʹ • όʔδϣχϯά͞ΕͨAPI • ςετͷࣗಈԽͰΑΓߴɾ ߴසͳσϓϩΠ͕Մೳʹ 7 "1*αʔϏε
খ ͞ ͘ ස ൟ ͳ Ξ οϓ σ ʔ
τ • αʔϏε୯ҐͰͷσϓϩΠ • มߋͷӨڹ͕શମ͔Βɹɹ αʔϏε୯Ґʹ • όʔδϣχϯά͞ΕͨAPI • ςετͷࣗಈԽͰΑΓߴɾ ߴසͳσϓϩΠ͕Մೳʹ 7 7 "1*αʔϏε
খ ͞ ͘ ස ൟ ͳ Ξ οϓ σ ʔ
τ • αʔϏε୯ҐͰͷσϓϩΠ • มߋͷӨڹ͕શମ͔Βɹɹ αʔϏε୯Ґʹ • όʔδϣχϯά͞ΕͨAPI • ςετͷࣗಈԽͰΑΓߴɾ ߴසͳσϓϩΠ͕Մೳʹ 7 7 "1*αʔϏε
Ta l k a b o u t … •
Why Microservices ? • Example Case • How to building Microservices ? • Conclusion
̏ छ ྨ ͷ Ξ ϓ ϩ ʔ ν •
֎෦αʔϏεͱͷ࿈ܞ • ΠϯϑϥϨΠϠͷׂ • WordPress as a Microservices
̏ छ ྨ ͷ Ξ ϓ ϩ ʔ ν •
֎෦αʔϏεͱͷ࿈ܞ • ΠϯϑϥϨΠϠͷׂ • WordPress as a Microservices
ಛ ఆ ͷ ػ ೳ Λ ଞ ͷ α ʔ
Ϗ ε Ͱ ࣮ ͢ Δ
֎ ෦ α ʔ Ϗ ε ͷ A P I
ʹ ର ͯ͠ɺ w p _ re m o t e _ g e t ( ) ; w p _ re m o t e _ p o s t ( ) ; ͳ Ͳ Ͱ ଓ ͢ Δ
̏ छ ྨ ͷ Ξ ϓ ϩ ʔ ν •
֎෦αʔϏεͱͷ࿈ܞ • ΠϯϑϥϨΠϠͷׂ • WordPress as a Microservices
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͕Ϛωʔδυ͢ΔαʔϏεʹҠৡ
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 ͕ ࣮ ࢪ
ϑΝΠϧɾσʔλΛ֎෦Խ͢Δ͜ͱͰɺ αʔόʔͷࣗಈεέʔϧΞτ͕Մೳʹ
h t t p : / / j a .
s t a t i c p re s s . n e t / StaticPressʹΑΔwp-adminͱ ϑϩϯτΤϯυͷ
StaticPressʹΑΔwp-adminͱ ϑϩϯτΤϯυͷ
̏ छ ྨ ͷ Ξ ϓ ϩ ʔ ν •
֎෦αʔϏεͱͷ࿈ܞ • ΠϯϑϥϨΠϠͷׂ • WordPress as a Microservices
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 / ԻೝࣝαʔϏεͱͷ࿈ܞ
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 …
h t t p s : / / g i
t h u b . c o m / w c - a p p / w c - a p p CordovaReact NativeΛ༻͍ͨ ωΠςΟϒΞϓϦ
None
Ta l k a b o u t … •
Why Microservices ? • Example Case • How to building Microservices ? • Conclusion
M i c ro s e r v i c
e Ξ ϯ νύ λ ʔϯ ͡Ί͔Β Microserviceͱͯ͠ ߏங͠Α͏ͱ͢Δ
ε λ ʔ τ Ұ ຕ ؠ • ελʔτγϯϓϧ͔ͭখ͘͞
• ͡Ί͔Βෳࡶͳߏʹ͢Δͱมߋίετ͕ߴ͘ͳΔ • γϯϓϧʹ͡ΊɺඞཁʹԠׂͯ͢͡Δ
͍ ͭ ׂ ͢ ͖ ͔ʁ • ίʔυͷཧ͕Ͱ͖ͳ͘ͳΔ·ͰංେԽͨ࣌͠ •
Ұ෦ͷػೳͷΈසൟʹΞοϓσʔτ͍ͨ࣌͠ • ։ൃνʔϜ͕ཧతʹΕ͍ͯΔ࣌ • ηΩϡϦςΟΛڧݻʹ͍ͨ͠෦͕Ͱ͖ͨ࣌ • ଞͷݴޠɾϑϨʔϜϫʔΫΛ༻͍ͨ࣌͠
H o w t o M i c ro s
e r v i c e ? • Ϗδωε୯ҐͰׂʢίϯΣΠͷ๏ଇʣ • ີ݁߹͔Βૄ݁߹ʢAPIϕʔεͰͷߏஙʣ • αʔϏεͷࢹͱোͷ
ί ϯ Σ Π ͷ ๏ ଇ
– M E LV I N C O N WAY
“γεςϜΛઃܭ͢Δ৫ɺ ͦͷߏΛͦͬ͘Γ·Ͷͨߏͷ ઃܭΛੜΈग़ͯ͠͠·͏”
ί ϯ Σ Π ͷ ๏ ଇ • ີ݁߹ͳ৫ɺີ݁߹ͳγεςϜΛઃܭ͍͢͠
• ϓϩδΣΫτɾػೳ୯ҐͷνʔϜͰ։ൃ͢Δͱɺɹɹ ૄ݁߹ʹͳΓ͍͢ • ʮ̎ຕͷϐβͰΓͳ͍νʔϜ࡞Δ͖Ͱͳ͍ʯ (Amazon)
A P I ϕʔε ͷ ։ ൃ
A P I ϕʔε ͷ ։ ൃ • αʔϏεຖʹಠཱͨ͠ΞϓϦͱͯ͠։ൃ •
APIΛ༻͍ͯ֎෦ͱ࿈ܞ͢Δ • APIͷΤϯυϙΠϯτόʔδϣχϯά͠ɺɹɹɹɹ ഁյతͳΞοϓσʔτʹඋ͑Δɹɹɹɹɹɹɹɹɹɹ ྫɿʮ/v1/coupons/ʯʮ /v2/wp/postsʯ
α ʔ Ϗ ε ͷ ࢹ ͱ ো
ͷ
Ͳͷ α ʔ Ϗ ε ͕ ࢭ · ͬͯ ͍
Δ ͔ Λ Δ ඞ ཁ ͕ ͋ Δ ×
α ʔ Ϗ ε ࢹ ͱ ো ͷ
• αʔϏε୯ҐɾΞϓϦશମͰࢮ׆ࢹ • োͷى͖ͨαʔϏεҎ֎ͰՔಇ͢ΔΈͷߏங • APIϦΫΤετͷλΠϜΞτʹΑΔԆʹඋ͑Δ
R O U T E 5 3 Λ ༻ ͍
ͨ ϑ Σ Πϧ Φ ʔόʔ α ʔό ো ࣌ S 3 ʹ ϧ ʔ ς Ο ϯ ά
Ta l k a b o u t … •
Why Microservices ? • Example Case • How to building Microservices ? • Conclusion
ै དྷ ͷ Wo rd P re s s ߏ
ங 8PSE1SFTT$PSF 1MVHJO 1MVHJO 1MVHJO 5IFNF 1MVHJO
ै དྷ ͷ Wo rd P re s s ߏ
ங Ұ ຕ ؠ ʹ ͳ Γ ͢ ͍ 8PSE1SFTT$PSF 1MVHJO 1MVHJO 1MVHJO 5IFNF 1MVHJO 1MVHJO $IJME 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO
ϓϥάΠϯɾςʔϚͷিಥ͕ൃੜ͢Δͱɾɾɾ 8PSE1SFTT$PSF 1MVHJO 1MVHJO 1MVHJO 5IFNF
1MVHJO 1MVHJO $IJME 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO 1MVHJO
None
ཛ Λ ̍ ͭ ͷ Χ ΰ ʹ · ͱ
Ί Δ ͱ ɺ ͦ ͷ Χ ΰ Λ མ ͱ ͠ ͨ ࣌ ʹ શ ໓ ͢ Δ
+BWB4DSJQU ػ ೳ ݮ Δ ͕ ɺ શ ମ
ੜ ͖ Δ )5.- "1* "1* "1* ×
ʮ ઈ ର ʹ མ ͱ ͞ ͳ ͍ Α
͏ ʹ ؤ ு Δ ʯ Ͱ ͳ ͘ ɺ ʮ ো ͕ ى ͖ ͯ શ ໓ ͞ ͤ ͳ ͍ ʯ
https://ja.wikipedia.org/wiki/%E8%88%AA%E7%A9%BA%E6%A9%9F#/media/File:Qantas_a380_vh-oqa_takeoff_heathrow_arp.jpg
https://ja.wikipedia.org/wiki/%E8%88%AA%E7%A9%BA%E6%A9%9F#/media/File:Qantas_a380_vh-oqa_takeoff_heathrow_arp.jpg ͠ Τ ϯ δ ϯ ͕ ࢭ ·
ͬ ͨ Β ʁ
ϥϜ Τ Ξ λ ʔ Ϗ ϯ • ඈߦػͷΤϯδϯ͕ࢭ·Δ ͱىಈ͢Δ෩ྗൃిػ
• ඈߦܭثͷిྗΛ֬อ͢Δ • Ͳ͔͜ʹো͕ى͖ͯɺ ઈରʹඞཁͳ֬อ͢Δ 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
ʮ ઈ ର ʹ མ ͱ ͞ ͳ ͍ Α
͏ ʹ ؤ ு Δ ʯ ͔ Β ʮ ো ͕ ى ͖ ͯ શ ໓ ͞ ͤ ͳ ͍ ʯ
T H A N K S ! • Why Microservices
? • Example Case • How to building Microservices ? • Conclusion