When to Multi Tenant?

When to Multi Tenant?

  
Hi OS community,

I am new to the concept of multi tenant applications, but I have been reading some OS documentation about it and find it an interesting concept to apply.

I am having some difficulty determining wheter an application should have multi tenancy or not. I would like to debate on the following topics/questions:

1- Your experience with this type of application and why did you choose Multi Tenancy for it?

2- From what I have been reading, achieving multi tenancy for an app is not an easy&fast task. How hard is it to setup and maintain the multi tenancy?

3- [Multi Tenancy] vs [Roles with custom data isolation], comparing implementation process, time, costs, advantages and disadvantages.

Best Regards,
Miguel Vieira
Miguel -

The Mt in Agile Platform is EXTREMELY low effort, and very robust. The biggest issue I had with it (couldn't debug across multi tenant espaces) has been fixed, so I really do not have any reason to not recommend it. In the past (pre-7) I was not so upbeat, and made a full framework of my own to do the same thing. That is no longer needed, thankfully.

It takes a few clicks to use it. It would take you less time to try it out in Agile Platform than to read the documentation, beleive it or not.

J.Ja
Miguel

The multi tenant feature allows a single instance of your application to serves multiple customers.

You would want to use this feature if you need to share common application solutions, multi tenant will isolate each customer with their own instance of your application solution.






 

perhaps even use the multi-tenancy for offices (in different countries) of your company.
Hi,

The only situation where I don't recommend multitenant is when the same user needs to be able to access multiple tenants. (apart from the administration backoffice scenarion explained in the technote, where the administrator has access to all tenants information)

Note that is still possible to do it on those scenarios, but requires extra coding to workaround the platform "user belongs to a single tenant" isolation.

Regards,
João Rosado
Hello guys,

This is a very insteresting topic since it's an issue that I know in the teory, but never applied in a real life application. Is there any OML (or solution) example where we can see all the tech terms applied and see it working?
Can anyone talk about a own experience implementing multi tenant in a client and describe the experience?

Regards,
Gonçalo M.
Hi,

You should check out the How to Build a Multi-tenant Application technical note.
And download the Resources as well.
Hi Paulo,

Thanks a lot for the information.
I'll read and check it as soon as possible.

Regards,
Gonçalo M.


Paulo Ramos wrote:
Hi,

You should check out the How to Build a Multi-tenant Application technical note.
And download the Resources as well.
 
 
Very interesting topic. How is multi-tenency implemeneted in the outsystems ? Using multiple schemas ?

Regards
Hi Kota,
 
Technically, the data separation in database is performed only "logically". The platform includes a column in your mult-tenancy tables, called TenantId, that nothing less is the foreign key to the system entity "Tenant". There is no data separation physically (like horizontal partitioning). Outsystems only ensures, via application, the data separation. I believe it's possible to somehow make this physical separation, using some DBMS resources, and automating it.
 
However, the use of this OutSystems platform feature, gives us a economy hundreds of thousands of development hours, and it's very easy to do.
 
Regards,
Breno Nico
Breno -

You missed something very important:

The platform creates a separate *view* for each tenant for each table. Unless you have exposed the tenant ID on an Entity to an eSpace, the system ALWAYS reads from the view that belongs to the current tenant.

So, unless you have exposed the tenant ID on an Entity, it is impossible for the application to accidentally read data that belongs to another tenant. It also means that if you are accessing the DB through a non-OutSystems technique (not a great idea in general) you can ensure data privacy by reading from the views.

J.Ja
there is a typical requirement in multi tenant, customers asks us, create an user that will login to all tenants. with same credentials. in that case we have to create the same user in all the tenants. this further complicates because the same user may have different roles assigned in different tenants. is there any elegant solution to this scenario? 

Ashis -

If they expect 1 user id to have full access to all of the data in all tenants... then you will end up exposing the tenant ID on all entities and not get much benefit from multi-tenancy.

If they want a single login to view a few things, and maybe do "Login As" to login as a user that belongs to a tenant, that is very simple. Just have a management eSpace that exposes tenant ID on the few entities needed, and make the "Login As" system. That system should just use the "Login" Action which does not require a password, and basically restarts your session as if you logged in as the specified user.

J.Ja
Breno Nico wrote:
Hi Kota,
 
Technically, the data separation in database is performed only "logically". The platform includes a column in your mult-tenancy tables, called TenantId, that nothing less is the foreign key to the system entity "Tenant". There is no data separation physically (like horizontal partitioning). Outsystems only ensures, via application, the data separation. I believe it's possible to somehow make this physical separation, using some DBMS resources, and automating it.
 
However, the use of this OutSystems platform feature, gives us a economy hundreds of thousands of development hours, and it's very easy to do.
 
Regards,
Breno Nico
 Thanks Breno for a very good answer. Do you think one can acheive 2 level tenency (Like company at first level and division at second) by using inbuilt tenency ? Thanks.

Regards