Multi-Tenancy & the Singleton Design Pattern
Since before xmas we have been working on a upgrading one of our core products which is built on the MS CRM platform (yes platform..working on a post about that topic).
Its the first time I have worked on a multi-tenant system and one of the first things you run into is not being able to use the standard singleton design pattern in a lot of common places. We use is for configuration information about the system but now that you can have multiple organizations (tenants) effectively sharing the same DLL loaded into memory means you have to think differently.
We took a very simple approach and just changed the existing singleton to have a new private member storing a generic list of configuration objects that can be accessed by passing the organization (tenant) as a parameter.
Anyone know of any better ways to accomplish this ?