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
460
コミュニティ運営から 中の人に変わって感じたこと
hideokamoto
0
53
Developerが Developer Advocateになった話 / dev-rel-meetup-tokyo-71
hideokamoto
0
270
Jamstack開発者のための App Runner入門
hideokamoto
1
420
WordPressでの webサイト制作2022 / ngk2022s
hideokamoto
0
380
JavaScript(TypeScript)で メディアサイトを インフラから構築する方法 / jsconf-jp-2021
hideokamoto
2
4k
AWS上でStripeを利用したアプリをより安全にデプロイする方法 /jaws-pankration-2021
hideokamoto
1
170
Shifter Headlessと Headless WordPressの紹介
hideokamoto
0
1.6k
Stripe & Next.js + AWS Amplify で会員 + 定期課金機能 / JP_Stripes20210903
hideokamoto
7
3k
Other Decks in Technology
See All in Technology
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
130
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
160
AIチャットボット開発への生成AI活用
ryomrt
0
170
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
610
複雑なState管理からの脱却
sansantech
PRO
1
150
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
520
SSMRunbook作成の勘所_20241120
koichiotomo
3
150
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
Platform Engineering for Software Developers and Architects
syntasso
1
520
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Facilitating Awesome Meetings
lara
50
6.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Building Your Own Lightsaber
phodgson
103
6.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Documentation Writing (for coders)
carmenintech
65
4.4k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
A Philosophy of Restraint
colly
203
16k
Raft: Consensus for Rubyists
vanstee
136
6.6k
The Cult of Friendly URLs
andyhume
78
6k
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