Database deployment models & multi tenancy

Database deployment models & multi tenancy

  
  • We are working on an application that will be used by a few hundred businesses, with a few thousands of end users. From an architecture point of view, we'd prefer to assign each subscribing business a separate database or schema.
  • Ideally, each business would be a tenant, and use OutSystems native multi tenancy. Quite some of these businesses belong to bigger parent organisations (or umbrella organisations).
    In the longer term, each business will have several millions of records, in 50 - 150 entities.
  • These parent organisations want to have some degree of access to the data of the child organisations. Most typically they will run aggregated reports, but direct access to the data may also be required.
But this causes some issues to implement with OutSystems, if I am right.
I have these questions:
  1. When using native entities, can we use multiple databases with user data?
    We want to deploy the application to the app server park (zones) and to the databases with user data.
    "Multiple databases" might either be different schemas in a single database, or physically separate database servers (we have to decide yet on the degree of segregation).
     
  2. When using multi tenancy, what is your advice?
    If I am right, we could configure multi tenancy on entities in their defining e-spaces (functionality for the individual businesses)
    For the parent organisations, we can reference the entities in other e-spaces and switch multi tenancy off in their e-space (check Show Tenant Identifier).
    If I am right, we can use API's to retrieve tenant information; so one might configure which tenants belong to which parent organisation. That way we could retrieve data for groups of child tenants.
    Is that a viable approach? Am I right that this would make it impossible to re-use "child business" functionality for "parent organisations", and vice versa?
    Any other advice?
     
  3. If we can not use native entities on different databases / schemas (as I assume) we may have to decide for external tables. Can we use OutSystems native multi tenancy in that case?
In general, any advice on the above scenario will be appreciated!

I have seen the question of mult level multi tenancy come by in forum questions, and even in the OutSystems multi tenancy demo. Organisations typically have different levels, you know :-)

Making the OutSystems tenancy / autorisation model reflect this reality would make things lots easier!
So does OutSystems have plans to extend multi tenancy to multiple levels?
Hi,
have you looked at the multy-tenancy how-to document? http://www.outsystems.com/goto/how-to-build-a-multi-tenant-application

Your questions are very specific (and pertinent) but if you haven't already read it I advise you to do so.
Yes, I read this completely, but after carefully reading the how-to, and watching the webinar (http://www.outsystems.com/company/events/web/multi-tenancy-demo/) the issues above are still unclear / unanswered.

BTW, we are working on the Java stack; this may be relevant, because the options to use catalogs are limited with Java stack - see http://www.outsystems.com/forums/discussion/13635/outsystems-java-stack-missing-core-features/
Hi,

I am also looking for the solution for the same , Please Suggest the solution.
I have some similar issues with multi-tenancy. Did either of you ever find any answers?
1. The native multitenancy uses views on top of the tables, then forces the queries to work with the views.

2. That all sounds correct.

3. No, of course not. You built tables outside the system, OutSystems can't apply logic to that automatically.

J.Ja
Justin James wrote:
1. The native multitenancy uses views on top of the tables, then forces the queries to work with the views.

2. That all sounds correct.

3. No, of course not. You built tables outside the system, OutSystems can't apply logic to that automatically.

J.Ja
 Thanks, Justin!