Multi tenancy of the SaaS application is a widely discussed topic in terms of the benefits it brings to the Independent Software Vendors (ISVs). The ISV is benefited by the reduction in operational costs and increase in operational efficiency due to multi-tenancy.
To make a single-tenant application into a multi-tenant application, re-engineering of the application may be required. The re-engineering effort depends on existing architecture of the application and will primarily focus on making the application meta-data driven.
An accelerated approach reducing the re-engineering efforts includes the following stages: Multi tenancy design, Meta data modeling and Meta data injection.
- Defining the mandatory and optional isolations that need to be provided between tenants
- Designing the multi-tenant data model both for referential and transactional data
- Designing the right strategy for data storage like shared, separate or hybrid storage
At this stage the core application architecture is not analyzed. However at the end of this stage clarity on data storage with appropriate scoping is achieved. The technology for data storage and any other limitations being imposed due to this must be taken into consideration.
- Understanding the relationship between the application and the data it uses or generates
- Identifying the various meta-data already used
- Defining new meta-data where it is needed for multi-tenancy but not currently used
- Modeling the tenant meta-data as templates which can be configured for each tenant subscribing to the service
During this stage, the application architecture is completely analyzed to identify the hot-spots in the code base considering that some key parameters could pose challenges to multi-tenant enablement. Some of these challenges are usage of singleton patterns, reading and writing data into global cache, usage of publically accessible static variables and hardcoded values. The point-cuts where the application flow has to be intercepted need to be decided based on analysis and the meta-data that would be used at those point-cuts defined.
- Enabling the application for meta-data injection
- Using interception techniques like Aspect Oriented Programming (AOP), dynamic proxies etc wherever applicable to inject the meta-data in a non-intrusive manner
- Implementing an alternative meta-data driven code base with the same logic, for code base that is not meta-data driven
During this stage the application is made completely meta-data driven. By managing the meta-data injection and management through an external platform, we can induce multi-tenant behavior in the application. This marks the completion of multi-tenant enablement process.
Multi-tenancy is an architectural feature which is typically designed ground up and could mean a significant re-engineering effort for existing single tenant applications. Our approach reduces the enablement effort to a considerable extent. However for this approach to be effective, apart from making the application meta-data driven, the tenant meta-data has to be managed effectively. Therefore a suitable platform which can help manage and inject the tenant meta-data into the application is necessary for the multi-tenant operation.
We would like to hear your thoughts on our approach towards enabling multi tenancy of applications and its impact to reduce re-engineering efforts.