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
270
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
Ruby on Rails と Django を比較してみる
free_world21
1
64
Shinjuku.rb#95:心の技術書紹介
free_world21
1
150
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
3
920
東証障害報告書を読み解く
free_world21
0
91
Ruby/Railsの勉強会のおかげでブルーモ証券起業した
free_world21
2
360
エンジニアとしての属性軸(自己分析軸?)を考えてみた
free_world21
0
64
(元)FinTechエンジニアが読み解く東証障害報告書
free_world21
0
730
railsでつくるなんちゃってserverless CMS〜コーポレートサイト編〜
free_world21
1
1.3k
railsとserverless技術で鉄道アプリを作った話〜なぜ僕はrubyでバイナリをパースしたのか〜
free_world21
1
800
Other Decks in Programming
See All in Programming
as(型アサーション)を書く前にできること
marokanatani
10
2.6k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Jakarta EE meets AI
ivargrimstad
0
610
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Jakarta EE meets AI
ivargrimstad
0
540
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
100
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Unsuck your backbone
ammeep
668
57k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Embracing the Ebb and Flow
colly
84
4.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Building Adaptive Systems
keathley
38
2.3k
Gamification - CAS2011
davidbonilla
80
5k
Ruby is Unlike a Banana
tanoku
97
11k
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