Suppose if I want to divert SQL query(s) to a specific schema such that each tenant will have a separate schema and based on user logged-in, application will decided which schema to query at runtime. How do I achieve this in CF ?
Frank(mingfan) Lu
Tel: 86-21-61976515
VMware Cloudfoundry Services Team
10F, KIC III, No. 333 Songhu Road, Yangpu District. Shanghai 200433
If I have a Web application which can be deployed as a software as a service application then to achieve database multi tenancy I can have either of the 3 below approaches in cloud foundry
1. separate database service for each tenant
The approach 2 which I mentioned has two ways of doing it:
The approach 2 which I mentioned has two ways of doing it:
1. Have multiple DB services, one for each tenant, but the question now is, how can a web app decide which service to connect for which user, what can be the possible ways in case if you have a single Web-App for all tenants,I can bind multiple DB services when I push an web app to CF but what will have if I create new DB service, do I need to push my Web-App every time I create a new DB service and bind those services
2. Have a single DB service and manage the tenant data isolation using schema, how this can be achieved in CF, does postgresql DB service gives this feature
How do I achieve data-source connection to multiple DB services. I can create a data-source for each db service and using application logic decide at run time which data-source connection to use based on user session
How do I achieve data-source connection to multiple DB services. I can create a data-source for each db service and using application logic decide at run time which data-source connection to use based on user sessionThe problem here is, if there is a new DB service created then I will have to change application configuration files, can this be abstracted ?
suppose if the service stops and after service restart, will the data-source connection still be active (or) do I need to restart my app.