I am all in one kind of guy, I have always wanted to create a software which had little (or more :)) bit of many things. So I started building a webtop solution of my own. As you can quickly see I get to work on a great webapp in which I can integrate a variety of mini applications (All In One). As it happens with any project, even the fun ones, you get to sit down and draw all the beautiful diagrams capturing bits and pieces of the system. During this process I soon realized that I can turn my webtop into a money mongering machine by selling it to many users (definitely more than a billion users would log into my application and make me rich, after all who can resist it :)). So immediately my initial design took a wider berth as it has to include the good ol Multitenant SaaS architecture into consideration.
For people who are into stingy definitions here are couple
Software as a service (SaaS, typically pronounced [sæs]), sometimes referred to as “on-demand software,” is a software delivery model in which software and its associated data are hosted centrally (typically in the (Internet Cloud) and are typically accessed by users using a thin client, normally using a web browser over the Internet.
Multitenancy refers to a principle in software where a single instance of the software runs on a server, serving multiple client organizations (tenants).
Ok, you all correctly guessed I stole the above definitions from wikipedia. But give me a break I am not a genius, I cant create definitions on my own so give it a rest. In lieu of above definition let us ponder a bit on what multitenant Saas Application has to offer. Since many users share same application instance hence there is a
- Increased resource utilization
- Decreased cost in Delivering the service.
- Easily manageable
- Decrease in hardware cost which can be installed on-demand.
Design considerations for a Multitenant SaaS application.
Designing the Multitenant Webtop was very fun and satisfying and off-course not so easy. There are tons of architecture, methods and what not on web and the available on the net, also the existing books are not easy to decipher. After reading much I arrived at following design aspects I had to take care in my webtop.
On Demand Scalibility – Since many users access a single instance of application hence the application should be easily and higly scalable. And on top of that SaaS provides should have a facility to scale easily when demand on system grows.
Data isolation – For many industry ciritical SaaS application, like payroll SaaS for instance, The data security is of critical importance hence there is a need of isolating data between multiple tenants.
High Degree of configurability – Each tenant has their own set of taste for look and feel, also there are set of configuration data, like smtp for instance, that are solely relevant to user. Hence it is pertinent for any SaaS application to go an extra length to provide user configurable version of application.
Security – It is quite obvious that any tenant would not like other users to be accessing and messing up with their data. Hence a security becomes unarguably one of the most important architectural component of a SaaS application.
If multitenancy was a person then we would look something like this.
Figure 0: Multitenant Man
It is easy to write in one paragraph all this on-demand scalability, security blah, blah. But how do we go in about achieving it. I will try and lay down some general rules on how to achieve this but not in this post. For that you have to wait for my future posts (can’t put everything in same bucket). For time being I will just tell you about technologies I will be using for my multitenant webtop application. I am a java guy hence I am biased towards using java technologies.
- Web Layer – Struts 2, Tuckey’s UrlFilter, jquery pluggin, sitemesh
- Business layer – Spring
- Database layer – Hibernate and Hibernate shards
- Security – Spring Security.