I have found this very good thread from 2006 about multi-tenant
applications:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/25bc6cd899318d9a/

I'm making my app available to multiple customers and right now my
strategy is:
1. svn export code
  each customer has their own
2. rake setup:initialize client_name
   which creates the databases and the database.yml file
3. rake db:migrate
  which creates all tables
4. rake setup:blank_slate  customer_name
 which adds some necessary predefined data from a couple of YML files.

The problems with this setup are:
 * the memory usage
   each tenant uses their own process and that takes a lot of memory
which is ridiculous considering that they run the same code
 * management and provisioning issues
   Updates are cumbersome and creating another app for a tenant is
time consuming and not that automated. The whole process takes about 1
minute. I I ddn't check out the code it would take less than 20
seconds.


I used before a hijack_db metod as a before_filter in
ApplicationController that switched the database depending on the
domain. I'm not sure about the performance or security of that hack.
How do you guys manage multiiple tenants and multiple databases?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to