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
500
コミュニティ運営から 中の人に変わって感じたこと
hideokamoto
0
59
Developerが Developer Advocateになった話 / dev-rel-meetup-tokyo-71
hideokamoto
0
280
Jamstack開発者のための App Runner入門
hideokamoto
1
440
WordPressでの webサイト制作2022 / ngk2022s
hideokamoto
0
400
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
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
54k
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
2.4k
RubyでKubernetesプログラミング
sat
PRO
4
160
デジタルアイデンティティ人材育成推進ワーキンググループ 翻訳サブワーキンググループ 活動報告 / 20250114-OIDF-J-EduWG-TranslationSWG
oidfj
0
540
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
170
AIアプリケーション開発でAzure AI Searchを使いこなすためには
isidaitc
0
110
CDKのコードレビューを楽にするパッケージcdk-mentorを作ってみた/cdk-mentor
tomoki10
0
210
あなたの知らないクラフトビールの世界
miura55
0
130
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
680
PaaSの歴史と、 アプリケーションプラットフォームのこれから
jacopen
7
1.5k
AWS re:Invent 2024 recap in 20min / JAWSUG 千葉 2025.1.14
shimy
1
100
ドメイン駆動設計の実践により事業の成長スピードと保守性を両立するショッピングクーポン
lycorptech_jp
PRO
12
2.2k
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
How to Ace a Technical Interview
jacobian
276
23k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
BBQ
matthewcrist
85
9.4k
The World Runs on Bad Software
bkeepers
PRO
66
11k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Typedesign – Prime Four
hannesfritz
40
2.5k
KATA
mclloyd
29
14k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Building Applications with DynamoDB
mza
93
6.2k
Practical Orchestrator
shlominoach
186
10k
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