Sass Application

Hi there,

Have any one working on SAAS application in yii. I wanted to develop one application that will server to many clients.

Please suggest me the best approach, possible approaches for SASS application are.

  1. One user - One application - One Database.

  2. Multiple users - Common application - multiple database.

  3. Multiple users - Common application - Common database.

Please suggest which approach will be suitable for YII.

Thanks in advance.

  1. Multiple users - Common application - multiple database.

this will be best approach i think.

A multiple database approach can be a nightmare for maintenance, especially if the customers know that they can request custom modifications to their database. The SaaS application I developed uses a single database for all tenants and their data is separated through MySQL updatable views that can only be accessed by its owner tenant. Something similar can be done with Oracle schemas; I don’t know enough about other db’s to tell you.

I suggest you do a Google search on the subject because it’s complicated and there are multiple opinions and things to consider. Good luck.s

I have googled for it, however every one have mix advice.

I have developed one SAAS application in yii last year with one shared database architecture, I concern about performance. Now this application have only 80 tenants it may go increase by 1000 this year, we will come to know about this application when tenants go to 1000.

However now I am creating new SASS application so I want an expert advice that if a SASS application will have 1000 tenants then what approach will be best as per performance wise as well as to maintain application.

Everyone has a different opinion because everyone has a different system to deploy. Perhaps you should heed those opinions from systems that are similar to what yours.

I believe performance and maintainability are 2 separate issues, with performance the easier one to solve progressively because you can see your needs evolve and act accordingly. However, if maintainability is badly done then it doesn’t matter how well the system performs. The database (MySQL anyway) can effectively scale vertically (i.e. a bigger, faster server) while the application can scale through caching, multiple webservers, a load balancer, etc. As far as I know the main problem with Yii scalability is the assets folder (that would be different in each webserver) but that can be worked around by setting up the user session to remain the same no matter which server handles it.

We have decided to implement approach Multiple users - Common application - multiple database,

So how we can manage multiple database creation for each tenant and how we can manage information in master idea, what is the best structure to maintain these database ?

My idea is like to create three databases

  1. Main database (master database) it will store information of all tenants.

  2. Template database - database to create for each tenants.

  3. Database for each tenant - that will be per tenant same structure as template database.

any suggestions ?

Good luck, friend…