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
Multi-tenancy in Rails
Search
Chris Stefano
February 06, 2014
Programming
1
92
Multi-tenancy in Rails
Overview of multi-tenancy in Rails and the apartment gem. Presented at RubyFuza 2014
Chris Stefano
February 06, 2014
Tweet
Share
More Decks by Chris Stefano
See All by Chris Stefano
Deploying with Heroku
virtualstaticvoid
1
43
Rails 3 Generators
virtualstaticvoid
0
42
Other Decks in Programming
See All in Programming
GoのWebAssembly活用パターン紹介
syumai
3
10k
レガシーシステムの機能調査・開発におけるAI利活用
takuya_ohtonari
0
610
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
1
120
XSLTで作るBrainfuck処理系
makki_d
0
210
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
120
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
840
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
590
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
800
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.2k
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
150
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
990
エンジニア向け採用ピッチ資料
inusan
0
160
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Fireside Chat
paigeccino
37
3.5k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
For a Future-Friendly Web
brad_frost
179
9.8k
BBQ
matthewcrist
89
9.7k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.8k
Side Projects
sachag
455
42k
Transcript
Multi-tenancy in Rails by Chris Stefano @virtstaticvoid Lightning Talk
The next killer app...
@tenderlove
@lgleasain
@moomoo
Multi-tenant Application
Icons by dryicons.com User is the tenant
Group of users is the tenant Icons by dryicons.com
Data?
Icons by dryicons.com Single database, tenant column
Icons by dryicons.com Database per tenant
Icons by dryicons.com Single database, schema per tenant
Requirements Icons by dryicons.com Icons by dryicons.com
Which tenant? Icons by dryicons.com
Safe data boundaries Icons by dryicons.com
Shared data? Icons by dryicons.com
Unobtrusive code
Specs + Fixture Data
Abstracts the database as an apartment
Use an elevator to activate apartment for tenant
None
None
Features ➢ Supported RDBMS Sqlite, MySQL, JDBC, Postgres & PostGIS
➢ Configuration Shared models, multi-schema, single or multi-database ➢ DB Migration support rake apartment:migrate ➢ Tenant Switching Rack middleware - host, domain, subdomain and custom ➢ Support for Background Workers delayed_job, sidekiq, resque
More Information ➢ RailsCasts #389 (Pro Subscription) http://railscasts.com/episodes/389-multitenancy-with-postgresql ➢ Multi-tenancy
with Rails (LeanPub Book) http://leanpub.com/multi-tenancy-rails ➢ apartment (Gem) http://github.com/influitive/apartment ➢ multitenant (Gem) http://github.com/wireframe/multitenant ➢ roomer (Gem) http://github.com/gosuri/roomer
Thank You Chris Stefano github.com/virtualstaticvoid @virtstaticvoid