Re: one model, multiple database instances

Delio Brignoli <[email protected]> Tue, 10 Aug 2004 21:13:43 +1200
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
On 10 Aug 2004 07:47:43 +0200
Sebastien Bigaret <[email protected]> wrote:

Hi,
I realized I wrote my first reply in a hurry so I'm writing this up to give you more info on what I want to achieve so you can have a better idea of what's involved.

The application runs in a multithreaded application server, a client to database instance mapping
is done by the application already ( in its first incarnation it was accessing the DB (almost-)directly )
let's say that we have a mapping between an ID string and a database connection string.
These are my ideas and the may not play well with the way modeling is designed, but I hope will be a starting point.

What I want to achieve:

When I create an EC, I'd like to pass the ID string as a parameter and this should give me an EC
that works 'like' a plain old connection to the mapped database instance.

How to get there:

- change the mapping into: ID -> ( connection params, model )
?- subclass EC to support the ID string be passed on __init__
?- subclass ObjectStoreCoordinator to use the ID string information in EC to create/select a proper 		DatabaseContext.
?- at which level caches work in modeling: I obviously don't want rows from different database instances to mixup :-P

regards
--
Delio


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285