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
FOLIO のマイクロサービス in Action / FOLIO's Microservic...
Search
Takuya "Mura-Mi" Murakami
October 26, 2019
Programming
3
1.4k
FOLIO のマイクロサービス in Action / FOLIO's Microservices in Action
Takuya "Mura-Mi" Murakami
October 26, 2019
Tweet
Share
More Decks by Takuya "Mura-Mi" Murakami
See All by Takuya "Mura-Mi" Murakami
効率の良さ (2024年1月 抜粋) / About Efficiency
mura_mi
0
130
スクラムにおける「完了」と「出荷」の話 / About Definition of Done
mura_mi
0
720
「アジャイル」の入り口に立つ / Entrance for "Agile"
mura_mi
0
250
ありふれたもの、未だ見ぬもの: FOLIO プロダクト開発の現場から
mura_mi
1
3.7k
Scala と Microservices でつくる 証券会社とスタートアップ / FOLIO in JJUG CCC 2018 Fall
mura_mi
3
5.8k
Scala でつくる証券会社とスタートアップ / Securities and Startup with Scala
mura_mi
10
11k
Head First LeSS
mura_mi
0
230
Other Decks in Programming
See All in Programming
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1k
受け取る人から提供する人になるということ
little_rubyist
0
230
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.8k
Arm移行タイムアタック
qnighy
0
290
Jakarta EE meets AI
ivargrimstad
0
510
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
270
Featured
See All Featured
BBQ
matthewcrist
85
9.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
It's Worth the Effort
3n
183
27k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Designing for humans not robots
tammielis
250
25k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
The Cult of Friendly URLs
andyhume
78
6k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Fireside Chat
paigeccino
34
3k
Transcript
FOLIO ͷϚΠΫϩαʔϏε in Action 2019/10/26 ΉΒΈΜ (ଜ্) Scalaؔαϛοτ2019 Copyright ©
2019 FOLIO, Ltd. All Rights Reserved. 1
ଜ্ (@Mura-Mi or @mura_mi) ΞϓϦέʔγϣϯΤϯδχΞ in FOLIO ͜Ε·ͰͷΩϟϦΞ: * Simplex,
Inc. (2012~2016) * CyberAgent AdTech Studio (2016~2018) * FOLIO (2018~ ) $ whoami 2
ࠓ͢͜ͱ 3 '0-*0ͷ͔ΜͨΜͳհ ϛΫϩ ୯ମαʔϏε ͷ ٕज़ελοΫ ϨΠϠΞʔΩςΫνϟ 'JOBHMF6TBHF ϚΫϩ
αʔϏεશମ ͷ Ͳ͏αʔϏεΛ͚Δ͔ ҆ఆӡ༻ͷίπ ࠓޙͷ՝
FOLIO ͱʁ 4
ScalaؔSummit 2018 ʮScalaͰͭ͘Δূ݊ձࣾͱελʔτΞοϓʯΑΓ https://speakerdeck.com/mura_mi/securities-and-startup-with-scala?slide=19 8 ڈͷ ScalaؔSummit Ͱ…
։ൃ։࢝ FOLIO ͷ͔ΜͨΜͳྺ࢙ 9 ۀ
ςʔϚࢿ ЌαʔϏε։࢝ ςʔϚࢿ -*/&ͱ࿈ܞ։࢝ ͓·͔ͤࢿ αʔϏε։࢝ ϫϯίΠϯࢿ αʔϏε։࢝ "84Ҡߦ։࢝ ਖ਼ࣜαʔϏε։࢝
ϛΫϩͳ 10 Photo by Darius Cotoi on Unsplash
Scala 11 ۀ͔࣌Β4DBMB ϚΠΫϩαʔϏεͰ։ൃ Λελʔτ υϝΠϯࣝͷදݱྗ +7.֎෦ػؔγεςϜͱͷۚ༥ಛ༗ͷϓϩτ ίϧ4%,ʹରԠ͍͢͠
Finagle, Finatra, TwitterServer 12 'JOBHMF5XJUUFSࣾͷ31$ϑϨʔϜϫʔΫ 5XJUUFS4FSWFS5XJUUFSͰͷ'JOBHMFαʔόʔΛηοτΞοϓ͢ Δͱ͖ͷςϯϓϨʔτΛ044Խͨ͠ͷ 'JOBUSB'JOBHMFͱ5XJUUFS4FSWFSΛར༻ͨ͠ΞϓϦέʔγϣϯϑ ϨʔϜϫʔΫɽϧʔςΟϯά%4-%*Λఏڙ ຖ݄ϦϦʔε͕͋Δ
WFS͕ZZZZNNܗࣜ$BM7FSͱ͍͏
Thrift 13 'BDFCPPL͕։ൃͨ͠31$ϑϨʔϜϫʔΫΠϯλʔϑΣΠ εఆٛݴޠ͓ΑͼόΠφϦ௨৴ϓϩτίϧ 'JOBUSB͕ओʹαϙʔτ͍ͯ͠Δͷ͕)551 3&45"1* ͓ Αͼ5ISJGU *%-ͷ͋Δ31$ϓϩτίϧͷඞཁੑܕ҆શɼ໌֬ͳ"1* ͷεΩʔϚཧ
'0-*0্ཱͪ͛ظʹH31$͕·ͩਖ਼ࣜϦϦʔεͷஈ֊Ͱ ͳ͔ͬͨ
ϨΠϠυΞʔΩςΫνϟ 14 Photo by Burhan Rexhepi on Unsplash
* ؔ৺ͷΛ࣮ݱ͢Δ্ͰɼϏδωε ϧʔϧͷ࣮ΛΠϯϑϥ (ϑϨʔϜϫʔ ΫϛυϧΣΞ) ʹґଘͤ͞ͳ͍ɽ * ϑϨʔϜϫʔΫϛυϧΣΞͷબࢶ ͕࣮࣭1͔ͭ͠ແ͍৫ͰɼυϝΠϯ ͷ࣮ΛϐϡΞʹอͭ͜ͱͰϏδωε
ϧʔϧͷมߋͳͲʹॊೈʹରԠͰ͖ ΔΑ͏ʹͳΔɽ 15 ΫϦʔϯΞʔΩςΫνϟ
FOLIO ͰͷయܕతͳϨΠϠΞʔΩςΫνϟ 16 EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU
JEMJOUFSOBM JEMFYUFSOBM JEM '0-*0ͷϚΠΫϩαʔϏεʹ͓͚ΔϨΠ Ϡ͚Λنఆ͢ΔࣾϑϨʔϜϫʔΫ ಛʹଘࡏ͠ͳ͍ ֤αʔϏεͷ։ൃ։࢝࣌ظʹΑͬͯΒ ͖ͭ͋Δ͕ɼ࠷ۙͷαʔϏεͷߏ ͓͓Αͦ͜ͷ༷ʹͳ͍ͬͯΔ ͜ͷίϯϙʔωϯτͦΕͧΕΛTCUͷα ϒϓϩδΣΫτͱͯ͠ఆٛ͠ɼґଘͷҧ ίϯύΠϧ͕௨Βͳ͍Α͏ʹ͍ͯ͠ Δ
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
domain ϨΠϠ 17 ͍ΘΏΔʮϏδωεͷؔ৺ࣄʯ ΤϯςΟςΟɺΦϒδΣΫτ ϦϙδτϦఆٛ USBJU ࣮͕Ͳͷ༷ʹͳ͍ͬͯΔ͔ͳΔ͘Ӆ͢ 3%# 3FEJT ώʔϓΩϟογϡ ଞϚΠΫϩ αʔϏε EPNBJO
PBR (Price and Book-Value Ratio, גՁ७ࢿ࢈ഒ) = גՁ / BPS
18 value object: ܭࢉࣜΛܕʹམͱ͠ࠐΉ
PBR (Price and Book-Value Ratio, גՁ७ࢿ࢈ഒ) = גՁ / BPS
18 value object: ܭࢉࣜΛܕʹམͱ͠ࠐΉ ϓϦϛςΟϒϥοϓ͢Δ
PBR (Price and Book-Value Ratio, גՁ७ࢿ࢈ഒ) = גՁ / BPS
18 value object: ܭࢉࣜΛܕʹམͱ͠ࠐΉ ࣜΛϝιουͱͯ͠ද͢
ఆ͚ٛͩॻ͘ 19 ֎෦αʔϏεݺͼग़͠ͷఆٛ
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
domain: Ͳ͜·Ͱִ͢Δʁ 20 Ӆ͍ͯ͠Δٕज़ৄࡉ 31$ΞϓϦέʔγϣϯ'8 'JOBHMF'JOBUSB 4DBMB%#Ϛοϐϯά 2VJMM ϓϨθϯςʔγϣϯ 5ISJGU Ӆ͍ͯ͠ͳ͍ٕज़ৄࡉ ඇಉظॲཧΛද͢ܕΫϥε 5XJUUFS'VUVSF δΣωϦοΫϓϩάϥϛϯά TIBQFMFTT ϚΠΫϩαʔϏεͷϝϦοτͱͯ͠ʮٕज़ҟ࣭ੑʯͱ͋Δ ͕ɼ࣮ࡍʜ EPNBJO
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
application ϨΠϠ 21 ʮϢʔεέʔεʯͱݺΕΔ෦ EPNBJOϨΠϠͷࣝΛΈ߹Θͤͯ"1*όο ν࣮ߦ࣌ͷॲཧ༰Λهड़͢Δ BQQMJDBUJPO
Ϣʔεέʔε Request ͔Β Response ͷؔͰ͋Δ 22 use case trait
Just pure Scala case class 23 DTO implementation
۩ମతͳܕύϥϝʔλʔΛͯΊΔͱʁ 24 use case implementation
࣮ࡍʹ͍ͬͯΔॲཧʁ 25 use case implementation
࣮ࡍʹ͍ͬͯΔॲཧʁ 25 use case implementation EPNBJOϨΠϠͷૢ࡞
࣮ࡍʹ͍ͬͯΔॲཧʁ 25 use case implementation Ϣʔεέʔεݻ༗ͷॲཧ Ϣʔεέʔεݻ༗ͷॲཧ
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
application: සग़ॲཧͱυϝΠϯͷৠཹ 26 BQQMJDBUJPOϨΠϠͰසग़͢Δॲཧ "QQMJDBUJPO4FSWJDFͱݺΜͰڞ௨Խͨ͠Γ "QQMJDBUJPOϨΠϠͱ%PNBJOϨΠϠͷڥᐆ ດ͕ͩɼBQQΛॻ͖ͳ͕ΒEPNBJOʹ͍࣋ͬͯ ͘ &WBOTຊʹग़ͯ͘Δʮৠཹʯॏཁͳ࡞ۀ BQQMJDBUJPO
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
presentation ϨΠϠ 27 "1*Λ࣮͢Δٕज़ৄࡉ '0-*0ͩͱຆͲ͕5ISJGUͳͷͰɺϢʔεέʔε %UPͱ5ISJGUͷڮ͠ͳͲ͕ओͳׂ QSFTFOUBUJPO
ࣾͷ׳ྫ্ Adapter ͱಡΜͰ͍Δ͕ɼTranslator Converter ͷ΄͏͕͍ۙ (ൺֱత৽͍͠αʔϏεʹͦͷΑ͏ͳωʔϛϯά͋Δ) 28 RequestAdapter
ࣾͷ׳ྫ্ Adapter ͱಡΜͰ͍Δ͕ɼTranslator Converter ͷ΄͏͕͍ۙ (ൺֱత৽͍͠αʔϏεʹͦͷΑ͏ͳωʔϛϯά͋Δ) 28 RequestAdapter 5ISJGUͷϦΫΤετҾ
ࣾͷ׳ྫ্ Adapter ͱಡΜͰ͍Δ͕ɼTranslator Converter ͷ΄͏͕͍ۙ (ൺֱత৽͍͠αʔϏεʹͦͷΑ͏ͳωʔϛϯά͋Δ) 28 RequestAdapter ϢʔεέʔεͷϦΫΤετ%50
ͻͨ͢Β Thrift ͷੜͷΛ VO ܕʹΊ͜ΜͰ͍͘ 29 RequestAdapter implementation
RequestThrift → RequestDto → UseCase → ResponseDto → ResponseThrift 30
Gateway
RequestThrift → RequestDto → UseCase → ResponseDto → ResponseThrift 31
Gateway
Gateway ʹ·ͱΊΔͷ DI ʹ͓·͔ͤͯ͠… 32 components
Finatra ͷ controller ʹ৯ΘͤΔ 33 controller
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
presentation ϨΠϠ 34 QSFTFOUBUJPO
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
idl 35 JEM΄ͱΜͲ5ISJGU*%-ͷΈͰߏ͞Εͨαϒϓϩ δΣΫτ 5ISJGUͷ*%-ͷΈΛೖΕͨKBSϑΝΠϧΛެ։ *%-ͷίϯύΠϧެ։ଆͰͳ͘ར༻͢Δଆͷࣄ ࣗαʔϏεͷ5ISJGU*%-ΛίϯύΠϧ JEM JEMJOUFSOBM
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
idl-external 36 ґଘ͢ΔϚΠΫϩαʔϏεͷίϯύΠϧΛߦ͏ JEMFYUFSOBM
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
infrastructure 37 EPNBJOϨΠϠͰఆ͚ٛͩॻ͍ͨϨϙδτϦFUDΛ %#ΫΤϦɺ3FEJTίʔϧɺଞϚΠΫϩαʔϏε ίʔϧͰ࣮͢Δ JOGSBTUSVDUVSF
Finagle Client Λୟ͍ͯ Domain Model ʹ٧Ί͢ 38 external service invocation
implementation
Finagle Client Λୟ͍ͯ Domain Model ʹ٧Ί͢ 38 external service invocation
implementation 5ISJGU*%-͔Βੜ͞Εͨ'JOBHMF$MJFOU
Finagle Client Λୟ͍ͯ Domain Model ʹ٧Ί͢ 38 external service invocation
implementation ଞαʔϏεͷฦΓΛυϝΠϯʹॻ͖ى͜͢
EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF CBUDIPSTFSWFS FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
entrypoint 39 ࠷ऴతͳ࣮ߦΫϥεDPOpHVSBUJPOΛஔ͘ CBUDIPSTFSWFS FOUSZQPJOU
ੲ: ࠷ॳ͔Β͜ͷߏͰͳ͔ͬͨ 40 TFSWFS CBUDI QSFTFOUBUJPO DPNNPO %#QFSTJTUFODF JEM EPNBJO
BQQMJDBUJPO CBUDITQFDJpD BQQMJDBUJPO ҙਤ͍ͯ͠Δ͍ͳ͍ʹؔ ΘΒͣɼυϝΠϯϩδοΫ هड़ͱJEM͕ີʹͭͳ ͕͍ͬͯͨɽ 3FQPTJUPSZ͕5ISJGUߏ ମΛฦ͢ ଞαʔϏεͷ5ISJGUߏ ମΛͦͷ··͏ TFSWFSTQFDJpD BQQMJDBUJPO TFSWFSTQFDJpD JOGSB CBUDITQFDJpD JOGSB
Thrift ͷੜΛϏδωεϧʔϧهड़ʹ༻͍ͳ͍ 41 υϝΠϯϨΠϠΛ*%-͔Βੜͨ͠ఆٛʹґଘͤ͞ͳ͍ͷ͕ԿΑ Γେࣄ ϝϯςφϯε࣌ͷϥΠϑαΠΫϧ͕ҧ͏ "1*֎෦αʔϏεͱͷܖɽޙํޓੑΛۃྗอͭΑ͏ʹ ӡ༻͢Δ ࣗαʔϏεͷσʔλϞσϧαʔϏεͷਐḿʹैͬͯॊೈ ʹݟͨ͠ΓɼϦϑΝΫλϦϯά͍ͨ͠
σʔλߏΛυϥεςΟοΫʹมߋ͢Δ͜ͱଟ͘ͳ͍͕ɼ ໊લͷݟ͔͠ͳΓଟ͍ҹ ͜Ε·Ͱݟ͑ͳ͔ͬͨڥք Λݟग़ͨ͠Γ͢Δ ΦϒδΣΫτΛ͑ͳ͍ɻৼΔ͍ΛΦϒδΣΫτͷυϝ ΠϯΦϒδΣΫτʹدͤΒΕͳ͍
Finagle ΛͲ͏͏͔ 42
Finatra Λར༻ͨ͠αʔϏεͷςϯϓϨʔτΛࣾϥΠϒϥϦͱ͢Δ 43 ࣾϥΠϒϥϦ util-finagle-all
ఆظతʹΞοϓσʔτ͢Δ (ຌͦʹҰʁ) 44 util/util-finagle-all
TwitterServer admin ʹϖʔδΛՃ͢Δ 45 'JOBHMF4FSWJDFΛ5XJUUFS4FSWFSΛఴ͑ͯىಈ͢Δͱɺ )551BENJO6*͕ىಈͯ͠ɺ֤छϝτϦΫεUPHHMF ޙ ड़ ͷঢ়ଶ͕֬ೝͰ͖Δɻ ͜ͷ5XJUUFS4FSWFSͷBENJOϖʔδʹಠࣗͷϖʔδΛ
Ճ͢Δ͜ͱ͕ग़དྷΔɻ SFBEܥͷ"1*ͷதͷ֬ೝɺରސ٬ϝοηʔδૹ৴ͷϦτϥΠ ࣮ࢪ༻ͷӡ༻ϢʔςΟϦςΟΛઃ͚Δͷʹ͍ͬͯΔ ຊ൪ڥ4".-͔ΒϦμΠϨΫτ͢ΔΑ͏ʹͯ͠ɺಛఆͷϩʔϧ ͕Ξλον͞Ε͍ͯͳ͍ͱ৮Εͳ͍Α͏ʹͳ͍ͬͯΔ
TwitterServer HTTP Admin 46
ಠࣗʹՃͨ͠ϖʔδ͔Β API ฦΓΛݟΔ 47
ಠࣗʹՃͨ͠ϖʔδ͔Β API ฦΓΛݟΔ 47 Ճͨ͠ϝχϡʔ
ಠࣗʹՃͨ͠ϖʔδ͔Β API ฦΓΛݟΔ 47 "1*ͷதΛ֬ೝͰ͖ΔΑ͏ʹ
ϚΫϩͳ 48 Photo by timJ on Unsplash
ϚΠΫϩαʔϏεͷ ڥքΛݟग़͢ࢹ 49 Photo by Adli Wahid on Unsplash
ϚΠΫϩαʔϏεΛͲ͏Δ͔ 50 ʮϚΠΫϩαʔϏεͷڥքυϝΠϯڥքͰ͋ Δʯͱ͋Δ υϝΠϯڥքΛݟۃΊΔͷγεςϜΛ࡞Δਓ ͷࣄͳͷͰɼࣄۀαʔϏεͷ͚ͩ͋Δ '0-*0ͰͲ͏ଊ͍͑ͯΔ͔Λ͓͑͢Δ͜ͱͰ ࢀߟʹͳΕ
৫ͱͷҰக:ʮϓϩμΫτʯͱʮۀج൫ʯ 51 '0-*0Ͱɼ ਓͷސ٬͕ෳͷۚ༥Λӡ༻͢Δ ͦΕͧΕͷۚ༥ಠࣗͷӡ༻ϩδοΫΛ࣋ͭ ਓͷސ٬ͷޱ࠲։ઃ৹͚ࠪͩߦ͏ɽͭ·Γۚ ༥Λ·͍ͨͯސ٬JEͭ ސ٬ͷอ༗͢Δۚ༥͝ͱʹޱ࠲͕ଘࡏ͢Δ ͖͕ͩɼ࠷ऴతͳצఆॲཧू͢Δ͖ ͜ΕΛҙࣝͯ͠ɼۚ༥Ͱग़དྷ্͕ΔͭͷίϯςΩε
τΛʮϓϩμΫτʯͱݺͼɼϓϩμΫτΛ·͍ͨͰσʔλ Λѻ͏ྖҬΛʮۀج൫ʯͱݺͿΑ͏ʹ͍ͯ͠Δ
ʮϓϩμΫτʯͱʮۀج൫ʯ 52 ςʔϚࢿ ϫϯίΠϯࢿ ސ٬ج൫ ސ٬ใཧɼޱ࠲։ઃɼ$4ରԠ ূ݊ج൫ צఆཧɼೖग़ۚɼจཧFUD ͓·͔ͤࢿ ۀج൫
ϓϩμΫτ
ࣗࣾͱଞࣾ: ϑΝαʔυͰ͋Γഊࢭ 53 ۚ༥αʔϏεΛࢧ͑ΔγεςϜɼࣗࣾҎ֎ͷఏڙ͢ΔγεςϜʹ ґΔϘϦϡʔϜ͕େ͖͍ औҾॴϒϩʔΧʔͱͷจୡ גՁ৴ɼίϯηϯαε༧σʔλ৴ σʔλϕϯμʔ צఆܥγεςϜ
֎෦"41Λར༻ ۜߦৼࠐडγεςϜ ఏܞઌαʔϏεͱͷ࿈ܞ FUDʜ σʔλΛड͚͢ϓϩτίϧ͕ҧͬͨΓɼϕϯμʔಠࣗͷޠኮ֓ ೦Λϥοϓ͢ΔͨΊʹϚΠΫϩαʔϏεΛݐͯΔɽ'0-*0෦͔ Β͢Δͱഊࢭɼ֎෦͔ΒݟΔͱϑΝαʔυͱͯ͠ػೳ͢Δɽ
ྫ: ֎෦γεςϜͱϚΠΫϩαʔϏε 54 σʔλϕϯμʔ 40"1 9.- $47WJB4'51 ϕϯμʔಠࣗͷ
σʔϞϯόΠφϦ ͷαϒεΫϥΠϒ 3&45"1*$BMM '0-*0 ϑϩϯτ ސ٬ࢿ࢈ ࢀরܥ ཧ -*/&͚ 'BDBEF σʔλ৴ ϕϯμʔ σʔλऔΓ ࠐΈ
୭͕͏ʁσʔλͷྲྀΕʁ 55 ʮϢʔβʔʯจ຺ʹґͬͯͭͷҙ ຯΛ࣋ͪ͑Δ ސ٬ ࣾΦϖϨʔλʔίϯςϯπ νʔϜ ϑϩϯτΞϓϦέʔγϣϯ͕ҧ͏ 4DBMBαʔϏεಉҰϨϙδτϦ͔ ΒෳαʔόʔΛݐͯͨΓ͢Δ
BENJOͱUP$αʔϏεͰεέʔ ϧΛม͑ͨΓ͢Δ BENJOࣾΞϓϦ͚"1* TFSWJDFUP$αΠτ͚"1*
αʔϏεΛࢭΊͣʹӡ༻͠ଓ͚Δ ͨΊͷʁ 56 Photo by Eric Bruton on Unsplash
ࢄτϨʔγϯάͱ Datadog 57 ϑϩϯτΤϯυ͔ΒͷϦΫΤετෳͷϚΠΫϩαʔϏεͰॲ ཧ͞ΕΔ ֤αʔϏεෳΠϯελϯεͰ࣮ߦ͞ΕΔ ֤αʔϏεΠϯελϯεͷు͖ग़͢ϩάʹJE USBDF*E Λ͠ɼ ϦΫΤετશମͷॲཧͷྲྀΕΛͰ͖ΔΑ͏ʹ͢Δ
ͯ͢ͷϩά%BUBEPHʹू͠ɼ&3303ϩάݕग़࣌ 4MBDLʹ USBDF*E͖ͷ63-Λྲྀ͢Α͏ʹ͍ͯ͠Δ
traceId ͱ datadog 58
traceId ͱ datadog 59
ػೳτάϧ (Feature Toggle) 60 ػೳ͕༗ޮͰ͋Δ͔Ͳ͏͔Λࣔ͢ਅِΛαʔόʔͷঢ়ଶ ͱͯ͠อ࣋͢Δɽ ৽ػೳطଘػೳͷվળ͞ΕͨίʔυΛಈ࡞ڥʹσϓϩΠ ͭͭ͠ɼͦͷίʔυΛಈ࡞ͤ͞Δ͔Ͳ͏͔ΛUPHHMF͢Δɽ ࣮ߦ͞Ε͍ͯΔϓϩηεͷUPHHMFΛΓସ͑ΒΕΔɽ දࣔσʔλͷσʔλιʔεΓସ͑ύϑΥʔϚϯεվળͳ
ͲɼUPHHMFແͩ͠ͱσϓϩΠΛΘͳ͍ͱલޙൺֱΛߦ͑ ͳ͍มߋͷಋೖɼݕূͳͲʹར༻͢Δɽ 'JOBHMF͕GFBUVSFUPHHMFػೳΛ༗͍ͯ͠ΔͷͰͦΕΛ ׆༻͍ͯ͠Δɽ
ػೳτάϧ (Feature Toggle) 61 Toggle ͷฦΓʹΑͬͯڍಈ͢Δ࣮Λ͑Δ
ػೳτάϧ (Feature Toggle) 61 Toggle ͷฦΓʹΑͬͯڍಈ͢Δ࣮Λ͑Δ ಉ͡USBJUΛ࣮ͨ͠ ෳͷ࣮
ػೳτάϧ (Feature Toggle) 61 Toggle ͷฦΓʹΑͬͯڍಈ͢Δ࣮Λ͑Δ 5PHHMFJTA*OU#PPMFBOA
ػೳτάϧ (Feature Toggle) 61 Toggle ͷฦΓʹΑͬͯڍಈ͢Δ࣮Λ͑Δ ࣮ࡍͷUPHHMFͷฦΓʹґͬͯ
ػೳτάϧ (Feature Toggle) 61 Toggle ͷฦΓʹΑͬͯڍಈ͢Δ࣮Λ͑Δ ͲͪΒͷ࣮Λಈ͔͔ܾ͢ΊΔ
ػೳτάϧ (Feature Toggle) 62 ઃఆϑΝΠϧ: Γସׂ͑߹ΛࢦఆͰ͖Δ
݁߹ϦεΫ ΛݮΒ͢ 63 "1*ͷޓੑطଘͷ"1*ͷޙํޓੑͳΔ่͘͞ͳ͍ ઃܭͷ #SFBLJOH$IBOHFΑΓ৽"1* Ϗοάόϯ݁߹ϦϦʔεΛ͠ͳ͍େ͖ͳ৽ػೳ৽ϓϩμΫ τϦϦʔεͷࡍɼΘΕͳ͍"1*͔ΒૣΊʹϦϦʔεΛ ͠ɼຊ൪ͱ։ൃڥͰͷϞδϡʔϧͷࠩҟΛখ͘͞อͭΑ͏ ʹ͢Δ
ЋϦϦʔεϑϩϯτΤϯυڥΛ௨ৗͷͷʹՃ͑ͯࣾ ݶఆͰΞΫηεڥΛߏங͠ɼ৽ػೳΛࣾϝϯόʔ͕ઌߦ ͯ͠ӡ༻ͯ͠Λݟ͚ͭग़͢
ࠓޙͷ՝ 64 Photo by Hans-Peter Gauster on Unsplash
େҬత CQRS తͳϦΞʔΩςΫνϟϦϯά 65 τϥσΟγϣφϧͳূ݊ձࣾʹʮϑϩϯτϛυϧόοΫΦ ϑΟεʯͱ͍͏৬ػೳͷྨ͕͋Δɽ ϑϩϯτऩӹΛ্͛Δ෦ɽ ωοτূ݊ͩͱސ٬͕จΛग़͠ɼऔҾΛߦ͏෦ ϛυϧϑϩϯτͷ׆ಈͷ݁ՌͷϞχλϦϯά όοΫϑϩϯτͷ׆ಈͷ݁Ռͷࣄޙॲཧ
ࣄɼצఆFUDʜ ϑϩϯτϛυϧόοΫ͝ͱʹγεςϜʹٻΊΒΕΔੑ֨ҟ ͳΔ ϑϩϯτऔҾओମͷίϚϯυΛड͚͚ͯॲཧΛ͢Δݎ࿚͔ ͭߴεϧʔϓοτͰ͋Δ͜ͱɽऩӹྗɽ ϛυϧ෯͍σʔλͷҰ؏ੑͷ͋Δࢀর όοΫεέʔϥϏϦςΟ
େҬత CQRS తͳϦΞʔΩςΫνϟϦϯά 66 '0-*0ͷαʔόʔαΠυγεςϜʮϑϩϯτϛυϧ όοΫΦϑΟεʯͷ͚Λҙࣝ͠ͳ͍··։ൃͨ݁͠ Ռɼͯ͢ͷϨΠϠʹ؏௨ͨ͠ϚΠΫϩαʔϏε͕ଘࡏͯ͠ ͍Δ ϑϩϯτγεςϜ$PNNBOE ϛυϧγεςϜ
2VFSZɼόοΫγεςϜଞͱҟͳΔ࣍όονॲཧɼͱ ͍͏͝ͱͷੑ֨ʹԠͨ͡Γͷ࠷దԽͱϦΞʔΩςΫ νϟϦϯάΛਐΊ͍ͨ
Ұ෦ॖୀӡ༻ 67 ϑϩϯτΤϯυͰଟͷϚΠΫϩαʔϏεͷޭϨεϙϯεΛ͢ ͯूͰ͖ͳ͍ͱϫʔΫ͠ͳ͍έʔε͕͋Δɽ Ұ෦ͷαʔϏε͕μϯ͍ͯ͠Δͱ͖ɼͦͷαʔϏεʹ֘͢Δ ػೳͷΈϑϩϯτͰEJTBCMFʹͯ͠ଞͷػೳͳ͘ճΔ Έ͕΄͍͠ɽ͜Ε͕Ͱ͖ΔͱαʔΩοτɾϒϨΠΫࣗ৴Λ ࣋ͬͯऔΓΊΔɽ લड़ͨ͠ϦΞʔΩςΫνϟϦϯάؚΊͨαʔϏεؒґଘͷཧ ɼϑϩϯτΤϯυͷΈվमؚΊͯऔΓΉඞཁ͕͋Δɽ
ϨΠϠΞʔΩςΫνϟͷະདྷ…?? 68 αʔϏε୯ମͷ࣮ΛݟΔͱ Ͳ͏ͯ͠ϘΠϥʔϓϨʔτ ͕ଟ͍ ੜ࢈ੑΛ্͛ΔͨΊʹͲ͏͠ Α͏ʜ ͯ͢ͷαʔϏε͕͜ͷߏ Λ౿ऻ͢Δ͖͔ݕ౼ͷ༨
͋Γʜ͕ͩɼࢦະͩແ ͍ EPNBJO BQQMJDBUJPO QSFTFOUBUJPO *OGSBTUSVDUVSF FOUSZQPJOU JEMJOUFSOBM JEMFYUFSOBM JEM
·ͱΊ 69 Photo by Kelly Sikkema on Unsplash
·ͱΊ: ͨΓલͷ͜ͱͰ͕͢ 70 దͳϨΠϠʔυΞʔΩςΫνϟΛ༻͍ͯϏδωεͷม Խʹڧ͍γεςϜΛ࡞Δ ϚΠΫϩαʔϏεͷڥքΛਖ਼͘͠ݟग़ͨ͢Ίʹɼࣗͨ ͕࣮ͪ͢ΔϏδωεྖҬͱ͔ͬ͠Γ͖߹͏ ϚΠΫϩαʔϏεͷ҆ఆӡ༻ͱܧଓతͳਐԽͷͨΊͷٕ ज़அΛ͢Δ
THANK YOU