multi tenancy with mvc3 and entity framework

Post on 29-Nov-2014

3.755 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

How to implement a Multi-Tenant web application using Asp.net MVC3 and Entity Framework.

TRANSCRIPT

Multi-tenancy with MVC3 and Entity Framework

-By Lasantha Bandara

What is a Tenant? Literally

“A person who occupies land or property rented from a landlord”

Is there any better example than Exilesoft…?

Is there any better example than Exilesoft…?

Moota

Is there any better example than Exilesoft…?

Moota

Pro-Account

They are Tenants of Exilesoft…

Moota

Pro-Account

Exilesoft

Same situation applies to the cloud based software applications. In SaaS (Software as a Service) Model Most of the web applications are SaaS – But

not Multi-Tenant…! Multi-Tenant Examples,

Highrise Jira YaY

In these systems, organizations make their accounts and they are provided a look and feel of their own ‘Home’

Why this is so important?

Data is vital for some businesses.

Should be able to isolate data among tenants in SaaS model.

If we provide it…. We have Competitive Advantage.

That implies…

Data Architecture is the most significant factor in a Multi Tenant Application.

We can identify 3 different architectures at present…

Separate DB – Separate Schema Shared DB – Separate Schema Shared DB – Shared Schema

Separate DB – Separate Schema

Extendibility with tenant specific requirements Easy Backup High Cost Suitable for Medical and Banking applications

in spite of high cost

Shared DB – Separate Schema

Separate set of tables for each tenant in same DB

Extendible and easy to implement Suitable if No. of Tenants < 100 Low cost than the previous one

Shared DB – Shared Schema

Lowest Cost Additional development effort Less security Each row contains tenant Id Suitable for a huge cluster of tiny tenants

Choosing an approach

Cost Based

Security

Shared Isolated

Tenant Attributes

Regularity Consideration(legal requirements of companies)

Skills set of development team

etc…

In YayCRM we have invented a model that is supported all those architectures

You can,- distribute databases in a server

farm- expand and shrink the number of databases- move tenants among databases

Tenant Databases

Metadata Database

Client Application Server

Structure of a

simple Multi-Tenant

Application

This is Yay

Model

Let’s go to demo…

top related