I have a moderately large rails ERP application having around 80 tables . I use MySQL . I recently received a client requirement which needs me to deploy the same application for roughly 10,000 offices(an instance for each office). The central office(superadmin office) must be able to view details from all these offices .
After talking with the client this is what i could come up with : Configure the app for 10,000 offices , there will be some new models for the data that need to be accessed by the superadmin . The tables for these models will be in another database (superdamin_database,not the one used by a particular office) , to which data to be reported to super admin will be written
I intend to make another app that would connect to this superdamin_database to present the data to super admin . So i will have 10000 app_databases and 1 superdamin_database
Where are my flaws in this plan ? What is the weakest point in this plan/structure that would render the application unusable due to a server load ? What is the rails way to do this . Hope the experienced guys in here would give a thought into this . Thanks in advance for your reply , Sam
Perhaps the concepts discussed at http://aac2009.confreaks.com/06-feb-2009-14-30-writing-multi-tenant-applications-in-rails-guy-naor.html will steer you in the right direction