[ZODB-Dev] Re: Ape and retrieval of other zodb items

Rocky Burt rocky.burt at bricsnet.com
Mon May 12 22:01:43 EDT 2003


On Mon, 2003-05-12 at 16:45, Shane Hathaway wrote:
> Ok, I see what you're saying.  I was suggesting what could happen when 
> storing data, not loading.  So now I'll think about loading.

Right.  Storing data is easy because in order to store the object, you
obviously have to have the object's makeup (the object itself).  I don't
think it'd be to hard to propagate that information into the gateway.


> Even simpler than that: schemas just verify compatibility between a 
> serializer and a gateway.  In Ape they serve no other purpose.

I was wondering about that.  Good to have it cleared up.


> Okay, let's take a different route.  Perhaps it's appropriate to give 
> gateways access to the live ZClass definitions.  It shouldn't be hard to 
> get Ape to open a read-only indepedent connection to the database.  It 
> might be a little tricky to keep the class definitions up to date unless 
> you don't mind having to restart after ZClass changes.  To avoid 
> recursion, the gateways should look at ZClass definitions and nothing else.
> 
> What do you think--is that what you have in mind?
> 

This sounds great.  Very much what I had in mind (the end-goal of having
access to zclass definitions I mean).  Obviously I would prefer to not
have to restart Zope for new/modified zclass definitions as thats one of
the reasons we're doing some zclass development to begin with.  But in
the short-term it wouldn't be too bad.

I did think about doing the independent connection to the database
containing the zclass definitions, but I've never done anything similar
so was just assuming it wasn't really plausible.


As an alternative to this I was looking into producing my own simple
mapping system (like your xml idea) so that the gateways could consult
with the predefined mapping.  But it bothered me somewhat that the
attribute information on a class had to be defined in two places (once
for the zclass definition itself in the control panel, and another in
this external mapping file).


- Rocky






More information about the ZODB-Dev mailing list