Re: MultiDb status ?

2008-08-29 Thread Ben Phillips

On Thu, Aug 28, 2008 at 8:18 PM, Rock <[EMAIL PROTECTED]> wrote:
>
> What you are describing is an edge case for the notion of "sharding"
> which is the deployment of identically structured DBs where different
> batches of users get saved in different databases. (Flickr does this.)

You could also move the sharding from the application to the db. MySQL
has MySQL Proxy  which HSCALE
 uses. Not sure about other
DBs. This way Django would just keep working as is.

Ben.

-- 
www.playfire.com - now in public beta!

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



Re: MultiDb status ?

2008-08-28 Thread Rock

What you are describing is an edge case for the notion of "sharding"
which is the deployment of identically structured DBs where different
batches of users get saved in different databases. (Flickr does this.)

Sharding is a different problem than the more general notion of
supporting multiple databases. It should be easier to accomplish, but
that is just a guess as I am not up-to-speed on the Django internals
with regards to connection management.

I can imagine that a middleware-based solution might be possible. but
it
would require hacking at a level well below the standard APIs. I will
give
this some thought, but I have been focused on partitioning as the way
to
improve scalability and data management for large Django apps.


On Aug 27, 3:40 am, Romain Gaches <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Thinking about switching from a homemade framework to django, I took a  
> look a the MultiDatabaseSupport stuff 
> (http://code.djangoproject.com/wiki/MultipleDatabaseSupport
> ).
> The related code seems to be 2 years old, is this branch still in  
> development ?
>
> I also noticed that the DB parameters are "statically" defined in the  
> settings. I'm actually looking for the ability to connect to a  
> database "on the fly" according to session-related data; would it be  
> possible without too much adapting work ?
>
> The aim is to have a separate database (with the same schema) for each  
> customer account in my app, the customer id being extracted from a  
> session variable.
>
> I'm currently using my own db manager: attaching & detaching databases  
> (SQLite, MySQL), cross-db requests, etc... but django's models are so  
> amazing I'd like to lighten my app with it :)
>
> --
> Romain
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: MultiDb status ?

2008-08-27 Thread [EMAIL PROTECTED]

That branch is totally dead, there is some external work attempting to
add multi-db support, I don't know the status of it though.

On Aug 27, 4:40 am, Romain Gaches <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Thinking about switching from a homemade framework to django, I took a  
> look a the MultiDatabaseSupport stuff 
> (http://code.djangoproject.com/wiki/MultipleDatabaseSupport
> ).
> The related code seems to be 2 years old, is this branch still in  
> development ?
>
> I also noticed that the DB parameters are "statically" defined in the  
> settings. I'm actually looking for the ability to connect to a  
> database "on the fly" according to session-related data; would it be  
> possible without too much adapting work ?
>
> The aim is to have a separate database (with the same schema) for each  
> customer account in my app, the customer id being extracted from a  
> session variable.
>
> I'm currently using my own db manager: attaching & detaching databases  
> (SQLite, MySQL), cross-db requests, etc... but django's models are so  
> amazing I'd like to lighten my app with it :)
>
> --
> Romain
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



MultiDb status ?

2008-08-27 Thread Romain Gaches
Hi,

Thinking about switching from a homemade framework to django, I took a  
look a the MultiDatabaseSupport stuff 
(http://code.djangoproject.com/wiki/MultipleDatabaseSupport 
).
The related code seems to be 2 years old, is this branch still in  
development ?

I also noticed that the DB parameters are "statically" defined in the  
settings. I'm actually looking for the ability to connect to a  
database "on the fly" according to session-related data; would it be  
possible without too much adapting work ?

The aim is to have a separate database (with the same schema) for each  
customer account in my app, the customer id being extracted from a  
session variable.


I'm currently using my own db manager: attaching & detaching databases  
(SQLite, MySQL), cross-db requests, etc... but django's models are so  
amazing I'd like to lighten my app with it :)

-- 
Romain
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---