Architecture In A Multi-Tenant World

Take Your Mamma...

As many of you know, the next version of Microsoft CRM (codename Titan) is focusing on a number of key design themes under the umbrella "Software as a Service" (or SaaS for short). From an application architect's point of view, there are three key differentiators that separate a well-designed SaaS application from a poorly designed one. A well-designed SaaS application is scalable, multi-tenanted, and configurable.

Scaling the application means maximising concurrency, and using application resources more efficiently for example, optimising locking duration, statelessness, sharing pooled resources such as threads and network connections, caching reference data, and partitioning large databases.

Multi-tenancy may be the most significant paradigm shift that an architect accustomed to designing isolated, single-tenant applications has to make. For example, when a user at one company accesses customer information by using a CRM application service, the application instance that the user connects to may be accommodating users from dozens, or even hundreds, of other companies all completely unbeknownst to any of the users. This requires an architecture that maximises the sharing of resources across tenants, but that is still able to differentiate data belonging to different customers.

Of course, if a single application instance on a single server has to accommodate users from several different companies at once, you can't simply write custom code to customise the end-user experience - anything you do to customise the application for one customer will change the application for other customers as well. Instead of customising the application in the traditional sense, then, each customer uses metadata to configure the way the application appears and behaves for its users.

Now we all know how powerful the mata-data driven configuration management capabilities of Microsoft CRM 3.0 are in comparison to many other business applications, and I as I mentioned in my May 2006 post entitled Microsoft CRM 3.0 Support for Windows Vista & Office 2007, Titan will be multi-tenanted, but what is that likely to mean to developers who are building custom extensions and add-ons for Microsoft CRM?

Well, in the absense of further details, with Titan technology adopter programmes (TAP) and beta programmes likely to kick off during H1 CY07, I came across a couple of MSDN architecture white papers discussing multi-tenancy, which I encourage you to take a look at:

Once you understand some of the architectural principles involved in building mult-tenanted applications, you should be in good shape to levearage some of the new capability within Titan. Also, I would also encourage you to revisit the CRM 3.0 SDK page entitled "Unsupported Customizations", especially the line:

"Modifications to the Microsoft CRM Web site (file and Web site settings). Custom solutions should be installed in a different Web site. This includes modifications to the file system access control lists (ACLs) of any files on the Microsoft CRM server. "

This is particularly relevant to the world of multi-tenancy, as files in the CRM web site are accessible to all CRM users, and it becomes very difficult to turn on/off your specific features for specific organisations within a multi-tenanty environment. This also applies if you load any of your application-specific settings within the web.config file, which also will be shared by all organisations.

This posting is provided "AS IS" with no warranties, and confers no rights.