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 アプリをマルチテナント対応して新規サービスをリリースするまでの道のり
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yuta Takahashi
August 25, 2022
Programming
1
3k
運用中の Rails アプリをマルチテナント対応して新規サービスをリリースするまでの道のり
2022/08/25 開催
【Railsエンジニア集合!】身近だけど知らないtoBサービスの裏側をのぞく
https://estie.connpass.com/event/255928/
Yuta Takahashi
August 25, 2022
Tweet
Share
More Decks by Yuta Takahashi
See All by Yuta Takahashi
開発チームの生産性向上に取り組む
ytakahashi
1
670
詳解 WindowInsets
ytakahashi
4
3.1k
Navigation Architecture Component によるアプリ内遷移の管理
ytakahashi
14
7.1k
MotionLayout Basics
ytakahashi
3
910
Other Decks in Programming
See All in Programming
CSC307 Lecture 14
javiergs
PRO
0
470
AHC061解説
shun_pi
0
350
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
380
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
240
Claude Code Skill入門
mayahoney
0
180
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
870
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
360
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
420
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.5k
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.9k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
500
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
140
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
140
Producing Creativity
orderedlist
PRO
348
40k
New Earth Scene 8
popppiees
1
1.7k
How to Ace a Technical Interview
jacobian
281
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Thoughts on Productivity
jonyablonski
75
5.1k
Exploring anti-patterns in Rails
aemeredith
2
290
Transcript
Rails 2 022 . 8 . 2 5 Thu
toB
yt-tkhs yt_hizi Android 2021 7 Flutter / Rails
: atohama SaaS
UUUO atohama 1 Rails ߪೖऀ༻ΞϓϦ ग़༻ΞϓϦ ߪೖऀ༻ΞϓϦ αʔόʔ
( )
: https://d 1 .awsstatic.com/whitepapers/ja_JP/saas-tenant-isolation-strategies.pdf
: https://d 1 .awsstatic.com/whitepapers/ja_JP/saas-tenant-isolation-strategies.pdf
citusdata/activerecord-multi-tenant gem User.all SELECT * FROM users; SELECT * FROM
users WHERE tenant_id = 1;
⾒ ID (Push )
ID (Push )
ID class Organization UUUO_ID = 1.freeze def uuuo? id ==
UUUO_ID end end
ID :
( ) ( ) ( )
None
( )
Before 1 . 2 . 1 . 2 . 3
. After
Before 1 . 2 . 1 . 2 . 3
. After
class Organization def tenant_owner? id == tenant.owner_organization_id end def tenant_admin?
is_admin end end
class Organization def tenant_owner? id == tenant.owner_organization_id end def tenant_admin?
is_admin end end ID
class Organization def tenant_owner? id == tenant.owner_organization_id end def tenant_admin?
is_admin end end
: ID
ID ID UUUO atohama ߪೖऀ༻ΞϓϦ ग़༻ΞϓϦ ߪೖऀ༻ΞϓϦ αʔόʔ
ID Push ID Push UUUO jp.uuuo.maehama jp.uuuo.atohama A jp.uuuo.atohama.xxx
ID ID ( DB ) ID
ID : ID ⾒
⾒ ID (Push )
None
citusdata/activerecord-multi-tenant
Thank you! microsoft/fluentui-emoji: https://github.com/microsoft/fluentui-emoji/blob/main/LICENSE