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
410
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
DjangoとRailsを使って趣味として政治資金を透明化するプロダクトを作ってる話
free_world21
0
53
Ruby on Rails on Kubernetesってどうなの?
free_world21
0
11
大事なデータを守りたい!ActiveRecord Encryptionと、より安全かつ検索可能な暗号化手法の実装例の紹介
free_world21
0
15
Ruby on Rails と Django を比較してみる
free_world21
1
220
Shinjuku.rb#95:心の技術書紹介
free_world21
1
240
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
3
1.3k
東証障害報告書を読み解く
free_world21
0
230
Ruby/Railsの勉強会のおかげでブルーモ証券起業した
free_world21
2
470
エンジニアとしての属性軸(自己分析軸?)を考えてみた
free_world21
0
110
Other Decks in Programming
See All in Programming
Honoアップデート 2025年夏
yusukebe
1
860
TDD 実践ミニトーク
contour_gara
0
150
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
210
AWS Serverless Application Model入門_20250708
smatsuzaki
0
140
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
990
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
1.1k
オープンセミナー2025@広島LT技術ブログを続けるには
satoshi256kbyte
0
130
コーディングは技術者(エンジニア)の嗜みでして / Learning the System Development Mindset from Rock Lady
mackey0225
2
580
Microsoft Orleans, Daprのアクターモデルを使い効率的に開発、デプロイを行うためのSekibanの試行錯誤 / Sekiban: Exploring Efficient Development and Deployment with Microsoft Orleans and Dapr Actor Models
tomohisa
0
210
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
660
KessokuでDIでもgoroutineを活用する / Go Connect #6
mazrean
0
120
一人でAIプロダクトを作るための工夫 〜技術選定・開発プロセス編〜 / I want AI to work harder
rkaga
13
2.8k
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Faster Mobile Websites
deanohume
309
31k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
How STYLIGHT went responsive
nonsquared
100
5.7k
Typedesign – Prime Four
hannesfritz
42
2.8k
Code Review Best Practice
trishagee
70
19k
Docker and Python
trallard
45
3.5k
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