1
votes

I am writing a multi tenant application in which each tenant has their own schema in a database or their own database. Because the tenant data is separate I'd like to be able to customize their tables by adding columns, or by creating additional views to meet their specific needs. Ideally, I'd like to make changes without recompiling the code.

This desire seems to run counter to how MVC is intended to work. My question is, can MVC and a multi schema, multi tenant architecture work when the schemas differ from each other slightly? If so, how do I design models that will allow for those variations?

2
You may want to look into FubuMVC mvc.fubu-project.org which is written to be multi tenant with customization required per client. - Shane Courtrille
@ShaneCourtrille a search for "schema" on their website returned nothing. Am I missing something? - Sparafusile

2 Answers

1
votes

I wanted to throw this out there in case you haven't stumbled upon it yourself:

http://weblogs.asp.net/zowens/archive/2010/05/29/multi-tenant-asp-net-foundation.aspx

0
votes

Here at Citus we're building a distributed/sharded multi-tenant database using PostgreSQL. You can go over our use-case guide, which goes over an example application. We don't shard by schema, but instead shard by the tenant-id. The table is then sharded across multiple nodes. For per-tenant information, we use JSONB, which then allows different tenants to keep different tenant-specific information.