Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multi tenant app that share data (Asp net mvc + Entity Framework + Sql Server)

I'm developing a multi tenant app architecture that is quite complex.

.

3 completly different kind of app

Ther is no only one type of application used by many customers; ther are 3 different kind of applications.

APP A, APP B, APP C

.

Each APP is multitenant

Each app has its customers.

APP A - customer A1 - customer A2

APP B - customer B1 - customer B2

APP C - customer C1 - customer C2

.

SHARED INFORMATIONS

Many informations are shared betwen the different apps

"customer A1" need to manipulate or only view data owned by "customer C1"

.

QUESTION

Consider that i'm using Asp net mvc, EF, Sql Server. Wich is the correct implementation?

One site and many Areas? Create multiple sites? Multiple db? Only one db? Filtering? Sql filtered view? ...

Some application example?

EDIT

and... Where to put the business logic?

like image 879
Marco Staffoli Avatar asked Nov 12 '10 10:11

Marco Staffoli


1 Answers

I would recommend that you first build your own multi-tenant engineering stack (Framework) on top of .Net which will handle all the requirements of multi-tenancy in terms of tenant wise data isolation, support for horizontal scaling, filtering of views based on the tenant context and role of the user, tenant wise data model extension, tenant wise UI customization, enforcing access restrictions based on roles, privileges and data scope - which could be different for different tenants etc.

The business logic can be built on top of this framework. This approach will provide your product a robust and strong engineering foundation.

The other alternative is to buy a ready to use multi-tenant engineering stack off the shelf, install it on Visual Studio and use it as a development template.

like image 94
Ramkumar Avatar answered Oct 20 '22 15:10

Ramkumar