Wednesday, August 4, 2010

Multi-Tenancy: Maintenance Dream or Nightmare?

Although multi-tenancy can lead to an improvement in the ease with which software can be deployed, maintenance can become more difficult due to the more complex code required in multi-tenant systems. Multi-tenancy is a concept which spans several software architecture layers and therefore, should be implemented in several software layers. If this is not done correctly, maintenance can become a nightmare. In our IWPSE-EVOL 2010 paper "Multi-Tenant SaaS Applications: Maintenance Dream Or Nightmare?" we discuss the pros and cons of multi-tenant systems with regards to maintenance.
We believe that the code complexity introduced by enabling multi-tenancy should not be significant in a well-designed single-tenant system. As a research project, we have migrated an existing single-tenant application to a multi-tenant one. We have used our multi-tenant reengineering pattern as a guideline:


We were able to do the migration by adding < 100 LOC to a 165 KLOC application. You can find the details of this process in our ICSM 2010 industrial paper "Enabling Multi-Tenancy: An Industrial Experience Report".

I'll be presenting this at the IWPSE-EVOL and ICSM conferences, so if you are there, drop by and we can have a beer afterwards!

Tuesday, June 8, 2010

SAP changes opinion about multi-tenancy

SAP was one of the companies who were against multi-tenancy, but in the new release of their product Business ByDesign they appear to have changed their opinion. Business ByDesign comes in a single-tenant and multi-tenant flavour.

It is definitely good to see large software vendors showing interest in multi-tenant solutions!

Tuesday, May 25, 2010

Challenges of Reengineering into Multi-Tenant SaaS Applications

First, I apologize for not updating this blog very much. I've been very busy with doing research and paper writing. I'll try to update more often :)

We have published a technical report on multi-tenancy, which I'd like to tell you about. You can download it at http://swerl.tudelft.nl/bin/view/Main/TechnicalReports (check the list out, there's tons of other cool stuff!).

Title: "Challenges of Reengineering into Multi-Tenant SaaS Applications"
Abstract: "Multi-tenancy is a relatively new software architecture principle in the realm of the Software as a Service (SaaS) business model. It allows to make full use of the economy of scale, as multiple customers - "tenants" - share the same application and database instance. All the while, the tenants enjoy a highly configurable application, making it appear that the application is deployed on a dedicated server. The major benefits of multi-tenancy are increased utilization of hardware resources and improved ease of maintenance, resulting in lower overall application costs, making the technology attractive for service providers targeting the small and medium enterprise (SME) business segment. In our paper, we identify some of the core challenges of implementing multi-tenancy. Furthermore, we present an architectural reengineering approach to support the migration of single-tenant applications into multi-tenant applications."

Feedback is welcome and much appreciated!

Thursday, December 24, 2009

Tuesday, December 15, 2009

My two cents on why multi-tenancy can help save the environment

Yesterday, I was watching a documentary about green solutions in technology, especially in server environments. With issues like global warming and the carbon dioxide emission problem nowadays, any solution which helps us keep this emission as small as possible can contribute to a better environment.

I believe that for software engineering, multi-tenancy is one of the key technologies which can help minimize the CO2 emission. The idea behind this is actually quite simple: in a traditional setup, each customer has his own dedicated resources. For most customers, 80% of these resources will be idle most of the time (based on the Pareto principle). Even though the resources are idle, they are still consuming energy, and therefore producing CO2. Using multi-tenancy, we need fewer resources, while we can increase the utilization of resources we need.

I’m not claiming to be a power management specialist, but I can’t imagine that running 1000 customers on one server consumes more power than having a dedicated server for each one of them. So, the more companies start implementing multi-tenant solutions, the more we, as software engineers, are able to contribute to the CO2 emission problem.

Wednesday, October 14, 2009

Multi-tenancy explained from a non-technical perspective

Recently, I had to give a short presentation about the topic of my PhD research to a group of people with no background in software engineering. I decided to explain multi-tenancy using a metaphor. As I have noticed many people do not understand exactly what multi-tenancy and its benefits are, I’ll elaborate on the metaphor in this blog post.

Imagine you are required to provide housing for a number of people, e.g. because you have a number of foreign employees currently working in your country. The first option to provide housing is to rent a complete house to everyone:

Although this works, there are some disadvantages to this situation:
  1. Costs: As every employee is required to rent a complete house, the costs are very high.

  2. Resource utilization: For most clients, a complete house is too large to use entirely, which results in many spare rooms.

  3. Maintenance: In order to do maintenance, e.g. replace the alarm system due to a bug, a maintenance guy (or girl) must visit all houses and replace the system in everyone of them.

The second option is to rent apartments to everyone, rather than complete houses:

This situation does not have the disadvantages of option 1:

  1. Costs: Renting an apartment is much cheaper than renting a house.

  2. Resource utilization: As the rented space is smaller, it is more likely that the space better fits the needs of the user. This leads to less spare rooms.

  3. Maintenance: As all apartments are in the same location, maintenance can be performed easier (and therefore cheaper).

Note that both a decrease in resource utilization and an increase in the maintenance complexity/effort also cause the costs to increase.

Although this example is for housing, the same ideas apply for software. In many ‘traditional’ situations, software is installed on the client side, either on their desktop or on a dedicated server:

For many customers, this is not an ideal solution, especially not for small companies:
  1. Cost: This solution requires a large investment, due to the requirement of an application server, database server, etc.

  2. Resource utilization: Many small businesses do their administrative tasks perhaps once a week, which means that their servers are idle during the rest of the week.

  3. Maintenance: For every software upgrade, all servers/installations must be upgraded individually.

As you can see, this approach is not very efficient for smaller companies. Luckily, we can apply the apartment principle to software as well. By letting multiple customers share the same application and database server, we can achieve the same benefits:

  1. Cost: As resource costs are much lower, software (or rather: a service, SaaS) can be offered to the customer at a much lower price.

  2. Resource utilization: All customers use the same application and database instance, which results in high utilization of these instances.

  3. Maintenance: All upgrades must be applied to one instance only, which results in lower maintenance costs.

In software engineering terms, we call this situation multi-tenancy:


Unfortunately, multi-tenancy also introduces some new problems and emphasizes some existing problems. I’ll elaborate more on these problems in a next blog post.

Wednesday, September 16, 2009

Early death of a blog?

Definitely not, but I've been very busy with holidays, conference visit (ESEC/FSE'09) and studying ASP.NET. So, this is just a short note to let you know I'll keep updating this blog, hopefully more often than the last 1,5 month :)