Re: Multi-tenant Django w/ Multi-DB?

2011-01-05 Thread Marco Louro
Thanks for your reply Justin,

I'd like to avoid having multiple tenants in the same database, I feel
multi-database is easier to scale, and simpler in a code maintenance
sense. It does required to run database migrations once per tenant,
but I still see it as the better solution.

One solution I saw is having a schema per tenant:
http://tidbids.posterous.com/saas-with-django-and-postgresql-schemas
and another is a pandora's box:
https://github.com/gregmuellegger/django-pandora

I haven't tried any of these, but they seem like they might be
solutions for this problem.


On Jan 5, 12:30 pm, Justin  wrote:
> Have you looked at the Sites framework? You could have multiple
> tenants using one database and use a ForeingKey to a Site object to
> structure the data. This will result in more complex queries, but
> might be less of a cost than the maintenance issues (see below).
>
> If you continue reading that IBM document, the "Database
> Considerations" section strongly urges you not to pursue the multiple-
> tenants, multiple-databases model due to the inherent maintenance
> overhead.
>
> http://www.ibm.com/developerworks/cloud/library/cl-multitenantsaas/#N...
>
> If you end up finding a good solution to this hairy problem, please
> post it. I'd be interested to see what you come up with.
>
> -Justin

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Multi-tenant Django w/ Multi-DB?

2011-01-05 Thread Justin
Have you looked at the Sites framework? You could have multiple
tenants using one database and use a ForeingKey to a Site object to
structure the data. This will result in more complex queries, but
might be less of a cost than the maintenance issues (see below).

If you continue reading that IBM document, the "Database
Considerations" section strongly urges you not to pursue the multiple-
tenants, multiple-databases model due to the inherent maintenance
overhead.

http://www.ibm.com/developerworks/cloud/library/cl-multitenantsaas/#N10210

If you end up finding a good solution to this hairy problem, please
post it. I'd be interested to see what you come up with.

-Justin

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Multi-tenant Django w/ Multi-DB?

2011-01-05 Thread Marco Louro
Hey,

I'm wondering if Multi-DB supports some kind of multi-tenancy on the
DB level (one app instance supporting multiple databases - one per
client - 2 on 
http://www.ibm.com/developerworks/cloud/library/cl-multitenantsaas/figure0.gif).
I don't think it does, but just want to be sure.

I'm thinking that each database would be named after the subdomain,
but storing every DB in settings.py is not an ideal solution for this.


Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.