Architecture for subscription based application
- by John
This is about the architecture of my application I think. I have a Rails application where companies can administrate all things related to clients. Companies can buy a subscription and their users can access the application online. Hopefully I will get multiple companies subscribing to my appplication/service. Thing is, what should I do with my code and database?
Seperate app code base and database per company
One app code base but seperate database per company
One app code base and one database
The decision I am to make involves security (e.g. user from company X should not see any data from company Y) performance (let's suppose it becomes successful, it should have a good performance) and scalability (again, if successful, it should have a good performance but also easy for me to handle all the companies, code changes, etc)
For sake of maintainability, I tend to opt for the one code base. For the database I really don't know at this moment. So what do you think is the best option?