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.1k
運用中の 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
430
詳解 WindowInsets
ytakahashi
3
2.1k
Navigation Architecture Component によるアプリ内遷移の管理
ytakahashi
14
6.2k
MotionLayout Basics
ytakahashi
3
790
Other Decks in Programming
See All in Programming
Git Rebase
bkuhlmann
11
1.6k
Ruby GitHub Packages
bkuhlmann
0
630
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
640
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
820
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
0
690
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
260
educure_カリキュラム生操作マニュアル.pdf
linew_official
0
700
Changed Rules: Architectures with Lightweight Stores
manfredsteyer
PRO
0
240
Ruby Pattern Matching
bkuhlmann
0
920
Goのエラースタックトレースの歴史と今後
sonatard
7
1.1k
코틀린으로 멀티플랫폼 만들기
pangmoo
0
150
ONE WEDGE_company_guide
1wedge_one
0
460
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Into the Great Unknown - MozCon
thekraken
10
990
WebSockets: Embracing the real-time Web
robhawkes
59
7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
Thoughts on Productivity
jonyablonski
58
3.8k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Side Projects
sachag
451
41k
Building Effective Engineering Teams - LeadDev
addyosmani
28
1.8k
GraphQLの誤解/rethinking-graphql
sonatard
50
9.2k
The Language of Interfaces
destraynor
151
23k
Making Projects Easy
brettharned
108
5.5k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
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