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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yuta Takahashi
August 25, 2022
Programming
3.1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
運用中の Rails アプリをマルチテナント対応して新規サービスをリリースするまでの道のり
2022/08/25 開催
【Railsエンジニア集合!】身近だけど知らないtoBサービスの裏側をのぞく
https://estie.connpass.com/event/255928/
Yuta Takahashi
August 25, 2022
More Decks by Yuta Takahashi
See All by Yuta Takahashi
開発チームの生産性向上に取り組む
ytakahashi
1
720
詳解 WindowInsets
ytakahashi
4
3.2k
Navigation Architecture Component によるアプリ内遷移の管理
ytakahashi
14
7.3k
MotionLayout Basics
ytakahashi
3
940
Other Decks in Programming
See All in Programming
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
270
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
160
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.8k
VibeCodingからAgenticWorkflowへ
starfish719
0
940
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
290
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
570
仕様駆動開発の消費期限
watany
20
9.1k
プロポーザルを書いてもらう
pvcresin
0
590
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
400
Oxlintはいいぞ(続)
yug1224
1
480
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
120
Cloudflare is Agents
chimame
0
180
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
250
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.4k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
830
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
450
Code Reviewing Like a Champion
maltzj
528
40k
Music & Morning Musume
bryan
47
7.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
400
The Curious Case for Waylosing
cassininazir
1
480
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
550
Unsuck your backbone
ammeep
672
58k
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