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
Yuta Takahashi
August 25, 2022
Programming
1
2.4k
運用中の 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
480
詳解 WindowInsets
ytakahashi
3
2.4k
Navigation Architecture Component によるアプリ内遷移の管理
ytakahashi
14
6.5k
MotionLayout Basics
ytakahashi
3
830
Other Decks in Programming
See All in Programming
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
9
2.4k
Increased Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
430
Amazon Neptuneで始める初めてのグラフDB ー グラフDBを使う意味を考える ー
satoshi256kbyte
2
260
Method Swizzlingを行うライブラリにおけるマルチモジュール設計
yoshikma
0
120
Hermes: Better Performance with Bytecode Translation (React Universe 2024)
tmikov2023
0
100
The Sequel to a Dream of Ruby Parser's Grammar
ydah
1
220
How to Break into Reading Open Source
kaspth
2
220
What is Parser
yui_knk
9
4.2k
今インフラ技術をイチから学び直すなら
yuhta28
1
140
Securify_エンジニア採用資料
3shake
0
110
Crafting Cross-Platform Adventures: Building a Game Engine with Kotlin Multiplatform
dwursteisen
0
220
Scala におけるコンパイラエラーとの付き合い方
chencmd
2
430
Featured
See All Featured
Visualization
eitanlees
142
15k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
1
55
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
Code Reviewing Like a Champion
maltzj
517
39k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
The Pragmatic Product Professional
lauravandoore
31
6.2k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Fontdeck: Realign not Redesign
paulrobertlloyd
80
5.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
Practical Orchestrator
shlominoach
185
10k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
354
29k
KATA
mclloyd
27
13k
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