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
Rails engineを用いたゆるふわモジュラーモノリス のご紹介
Search
free_world21
June 07, 2024
Programming
1
210
Rails engineを用いたゆるふわモジュラーモノリス のご紹介
Omotesando.rb #98でLT発表した資料です。
https://omotesandorb.connpass.com/event/319813/
free_world21
June 07, 2024
Tweet
Share
More Decks by free_world21
See All by free_world21
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
3
770
東証障害報告書を読み解く
free_world21
0
72
Ruby/Railsの勉強会のおかげでブルーモ証券起業した
free_world21
2
320
エンジニアとしての属性軸(自己分析軸?)を考えてみた
free_world21
0
55
(元)FinTechエンジニアが読み解く東証障害報告書
free_world21
0
690
railsでつくるなんちゃってserverless CMS〜コーポレートサイト編〜
free_world21
1
1.2k
railsとserverless技術で鉄道アプリを作った話〜なぜ僕はrubyでバイナリをパースしたのか〜
free_world21
1
760
金融機関の(システムの)作り方
free_world21
0
1.5k
セキュアなRAILSアプリを目指す Part2: 暗号化編(鍵の管理)
free_world21
1
660
Other Decks in Programming
See All in Programming
null or undefined
susisu
20
4k
Desafios e Lições Aprendidas na Migração de Monólitos para Microsserviços em Java
jessilyneh
2
130
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
3
580
Some more adventure of Happy Eyeballs
coe401_
2
150
ゲームボーイアドバンスでSwiftを動かそう
k_koheyi
0
510
TypeScriptで 負荷テストを書こう 〜k6のシングルバイナリの秘密〜
dora1998
7
2.8k
これからの時代の新標準!SwiftTestingへの移行とトラブルシューティング
uetyo
0
440
ECMAScript仕様を読むのに必要な知識 - ダイジェスト版
syumai
4
2.5k
数値を文字列に整形する際の落とし穴とその解決策(iOSDC2024 ルーキーズLT) / iOSDC Japan 2024 Formatting Floating-Point Numbers
glassfiber
0
250
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
2
240
Regular Expressions, REXML, Automata Learning
makenowjust
0
180
プログラマのための音楽入門
cheebow
4
540
Featured
See All Featured
Gamification - CAS2011
davidbonilla
79
4.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
46
48k
What the flash - Photography Introduction
edds
67
11k
KATA
mclloyd
27
13k
Raft: Consensus for Rubyists
vanstee
135
6.5k
Principles of Awesome APIs and How to Build Them.
keavy
125
16k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
662
120k
GitHub's CSS Performance
jonrohan
1029
450k
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Code Review Best Practice
trishagee
62
16k
Transcript
3BJMTFOHJOFΛ༻͍ͨ ΏΔ;ΘϞδϡϥʔϞϊϦε ͷ͝հ 5IV খྛޛ࢙ OPFM ϒϧʔϞূ݊גࣜձࣾ 0NPUFTBOEPSC
▪ খྛ ޛ࢙ʢখྛ ϊΤϧʣ ▪ ຊۀɿϒϧʔϞূ݊גࣜձࣾ औక$50 – ถࠃגɾถࠃ&5'ઐۀͷظࢿ࢈ܗಛԽ ܕͷࢿΞϓϦΛ࡞ͬͯΔ'JOUFDIελʔ
τΞοϓ ▪ ΄ͲϑϦʔϥϯεΤϯδχΞ – ్தࣄۀձࣾͷதͷਓͬͨ ▪ ʙɿϒϧʔϞΠϯϕετϝϯτגࣜձࣾ ΛڞಉۀʢޙʹϒϧʔϞূ݊גࣜձࣾʹ߸ มߋʣ ▪ झຯɿཱྀߦɾੈքͷίϫʔΩϯάεϖʔεΊ͙ ΓʢϫʔέʔγϣϯతͳԿ͔ʣ @free_world21 THE FARM@NY CARR WORKPLACE@Chicago https://bloomo.co.jp/
એɿҰൠެ։͠·ͨ͠ʂ
એɿҰൠެ։͠·ͨ͠ʂ
ຊ
େΞʔΩςΫνϟʢʁʣ ϞϊϦεΞʔΩςΫνϟ ▪ ͍ΘΏΔຕؠ ▪ ͭͷϦϙδτϦʢϓϩδΣΫτʣ ʹͯ͢ͷίʔυ͕ೖͬͯΔ ▪ ݸਓ։ൃখن։ൃͰΔͳΒ͜ Ε
▪ ৫తʹ͍ͬͯ͘߹ɺਆͷ Λ࣋ͭγϯɾΤϯδχΞ͕ඞཁʹ ͳͬͯ͘Δؾ͕͢Δ ϚΠΫϩαʔϏεΞʔΩςΫνϟ ▪ ෳͷখ͞ͳαʔϏεʢσϓϩΠ Մೳͳ୯Ґ㲈ϓϩηεɺίϯς φʣ͕ڠௐ͋ͬͯͭ͠ͷେ͖ͳ αʔϏεΛ࣮ݱ͢Δ ▪ ,VCFSOFUFTͱηοτͰޠΒΕΔ ͜ͱ͕ଟ͍ʢಛʹ(Pք۾ʣ ▪ ਓۚ͋Δڧऀͷઓུʢͩͱ ࢥͬͯΔʣ ϞδϡϥʔϞϊϦεΞʔΩςΫνϟ ▪ ͦͦ͜͜େ͖͍մΛෳΈ߹Θͤ ͯͭͷେ͖ͳαʔϏεΛ࣮ݱ͢Δ ▪ ϞϊϦεͱϚΠΫϩαʔϏεͷதؒ ʢʁʣɻਖ਼֬ͳఆٛͳ͍ʢʁʣͱ ࢥͬͯΔ ▪ ϕετϓϥΫςΟεJTͲΕʁ
ΤϰΝϯήϦΦϯʹྫ͑Δͱ ϞϊϦεΞʔΩςΫνϟ ʹΩʔϧٞ ϚΠΫϩαʔϏεΞʔΩςΫνϟ ʹୈెΠϩϧ ϞδϡϥʔϞϊϦεΞʔΩςΫνϟ ʹθʔϨ
ϚΠΫϩαʔϏεͷىݯ ▪ +BNFT-FXJT BOE.BSUJO'PXMFS l.JDSPTFSWJDFT zNBSUJOGPXMFSDPN ▪ ϚΠΫϩαʔϏεͷରൺͱͯ͠ϞϊϦε͕ޠΕΔ
▪ ͦͷޙ֓೦ͱͯ͠ఆண͠ɺଟ͘ͷॻ੶ࣄྫ͕ग़൛ ͞ΕΔ https://martinfowler.com/articles/microservices.html
ϞϊϦεΞʔΩςΫνϟ https://www.atlassian.com/microservices/microservices-architecture/microservices-vs-monolith
ϚΠΫϩαʔϏεΞʔΩςΫνϟ https://www.atlassian.com/microservices/microservices-architecture/microservices-vs-monolith
ϚΠΫϩαʔϏεΞʔΩςΫνϟ https://www.atlassian.com/microservices/microservices-architecture/microservices-vs-monolith
ϞδϡϥʔϞϊϦεJTԿʁ https://arxiv.org/pdf/2401.11867 https://www.milanjovanovic.tech/blog/what-is-a-modular-monolith https://speakerdeck.com/shunsugai/railsdemodular- monolithwoxuan-ze-saretayu-she-nizhi-wen-sitainge-noyi-wen
ϞδϡϥʔϞϊϦεJTԿʁ ▪ దʹׂ͞Ε͍ͯΔ ▪ σϓϩΠ͢Δ࣌ʹ݁߹ͯͭ͠ͷαʔϏεʢϞϊϦ εʣʹ͢Δ ▪ ʰϚΠΫϩαʔϏεʹࢸΔ·Ͱͷલஈ֊ͱͯ͠༗༻ʱ ▪ ϑϨʔϜϫʔΫࣄྫ
– (PPHMF4FSJWDF8FBWFS (P – 4IPQJGZQBDXFSL 3BJMT – %KBOHP 1ZUIPO ࣮ϞδϡϥʔϞϊϦεͳؾ ͕͢Δ খྛͷཧղ ϞϊϦεͱϚΠΫϩαʔϏεͷ྆ํͷྑ͞ΛڗडͰ͖Δ Α͏ʹ͍͍ײ͡ʹׂͨ͠ͷ https://arxiv.org/pdf/2401.11867
ϒϧʔϞͷΏΔ;ΘϞδϡϥʔϞϊϦε ΞϓϦ༻"1*αʔό DPNNPO@NPEFMT DPOUSPMMFS BENJO༻SBJMTΞϓϦ DPNNPO@NPEFMT BENJO@NPEFMT BENJOଆDPOUSPMMFST BENJOଆWJFXT "1*ݺͼग़͠
"1*ݺͼग़͠
ϒϧʔϞͷΏΔ;ΘϞδϡϥʔϞϊϦε ΞϓϦ༻"1*αʔό DPNNPO@NPEFMT DPOUSPMMFS BENJO༻SBJMTΞϓϦ DPNNPO@NPEFMT BENJO@NPEFMT BENJOଆDPOUSPMMFST BENJOଆWJFXT "1*ݺͼग़͠
"1*ݺͼग़͠ • ڞ௨෦SBJMTFOHJOFͱ࣮ͯ͠ʢFOHJOF໊ɿ commonʣ • جຊతʹNPEFMͷΈΛஔ • BQJଆɺBENJOଆͷ(FNGJMFʹcommonΛهࡌ͢Δ • BQJଆͷNPEFMͯ͢BENJOଆͰѻ͑Δ • BQJଆͷapp/modelsҎԼʹಠࣗNPEFMఆٛ ͠ͳ͍ • BENJOଆapp/modelsҎԼʹBENJOଆͰ͔͠ Θͳ͍NPEFMΛఆٛ͢Δ
ϒϧʔϞͷΏΔ;ΘϞδϡϥʔϞϊϦε ΞϓϦ༻"1*αʔό DPNNPO@NPEFMT DPOUSPMMFS BENJO༻SBJMTΞϓϦ DPNNPO@NPEFMT BENJO@NPEFMT BENJOଆDPOUSPMMFST BENJOଆWJFXT "1*ݺͼग़͠
"1*ݺͼग़͠ • ϚΠάϨʔγϣϯBENJOଆͰҰׅͰߦ͏ • BQJଆʹςʔϒϧ͝ͱʹඞཁͳݖݶͷΈΛ༩͑Δ GRANT SELECT, INSERT ON on database_name.users; GRANT SELECT, INSERT, UPDATE ON on database_name.personal_infos; GRANT SELECT, INSERT, DELETE on database_name.likes;
ϒϧʔϞͷΏΔ;ΘϞδϡϥʔϞϊϦε ΞϓϦ༻"1*αʔό DPNNPO@NPEFMT DPOUSPMMFS BENJO༻SBJMTΞϓϦ DPNNPO@NPEFMT BENJO@NPEFMT BENJOଆDPOUSPMMFST BENJOଆWJFXT "1*ݺͼग़͠
"1*ݺͼग़͠ • BQJଆαʔόʢίϯςφʣʹapiͱcommonΛσϓ ϩΠ͢ΔσΟϨΫτϦҎԼʹฒྻʹஔ • BENJOଆαʔόʢίϯςφʣʹadminͱcommonΛ σϓϩΠ͢ΔσΟϨΫτϦҎԼʹฒྻʹஔ
ͬͯΈͨॴײ ▪ ྑ͔ͬͨ͜ͱ – ͷׂ͕໌֬ʹͳΓɺνʔϜͰ͖ͨ – ηΩϡΞʹͳͬͨ ▪ BQJଆͰʓʓͰ͖ͳ͍ɺΈ͍ͨͳSTQFDॻ͔ͳͯ͘͢Μͩ –
ʢ·ͩͬͯͳ͍͚ͲʣDPOUSPMMFSWJFXΖ͏ͱࢥ͑FOHJOFʹॻ͘͜ͱ͕ͰΔ ▪ ѱ͔ͬͨ͜ͱ – BQJଆͷػೳͳͷʹBENJOଆʹॻ͔ͳ͚Ε͍͚ͳ͍ͷ͕Ұ෦͋ͬͯɺ໌֬ͳ͕Ұ෦ Ͱ͖ͯͳ͍ – BQJɺBENJOͱ͚ͨͷͷɺͦΕͧΕ͕ڊେϞϊϦεʹͳΓͭͭ͋Δ
৽ͨͳ3BJMTϞδϡʔϧ͕ඞཁʹͳΓͭͭ͋Δ ΞϓϦ༻"1*αʔό DPNNPO@NPEFMT DPOUSPMMFS BENJO༻SBJMTΞϓϦ DPNNPO@NPEFMT BENJO@NPEFMT BENJOଆDPOUSPMMFST BENJOଆWJFXT "1*ݺͼग़͠
"1*ݺͼग़͠ ͚3BJMTϞδϡʔϧ DPNNPO@NPEFMT DPOUSPMMFS ︖
৽ͨͳ3BJMTϞδϡʔϧ͕ඞཁʹͳΓͭͭ͋Δ ΞϓϦ༻"1*αʔό DPNNPO@NPEFMT DPOUSPMMFS BENJO༻SBJMTΞϓϦ DPNNPO@NPEFMT BENJO@NPEFMT BENJOଆDPOUSPMMFST BENJOଆWJFXT "1*ݺͼग़͠
"1*ݺͼग़͠ ͚3BJMTϞδϡʔϧ DPNNPO@NPEFMT DPOUSPMMFS ︖
৽ͨͳ3BJMTϞδϡʔϧ͕ඞཁʹͳΓͭͭ͋Δ ΞϓϦ༻"1*αʔό DPNNPO@NPEFMT DPOUSPMMFS BENJO༻SBJMTΞϓϦ DPNNPO@NPEFMT BENJO@NPEFMT BENJOଆDPOUSPMMFST BENJOଆWJFXT "1*ݺͼग़͠
"1*ݺͼग़͠ .'͚3BJMTϞδϡʔϧ DPNNPO@NPEFMT DPOUSPMMFS ︖
৽ͨͳ3BJMTϞδϡʔϧ͕ඞཁʹͳΓͭͭ͋Δ ΞϓϦ༻"1*αʔό DPNNPO@NPEFMT DPOUSPMMFS BENJO༻SBJMTΞϓϦ DPNNPO@NPEFMT BENJO@NPEFMT BENJOଆDPOUSPMMFST BENJOଆWJFXT "1*ݺͼग़͠
"1*ݺͼग़͠ .'͚3BJMTϞδϡʔϧ DPNNPO@NPEFMT DPOUSPMMFS ︖ ͜͜࡞ͬͯ͘ΕΔਓΛ8FBSF)JSJOH