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

Shane Hathaway shane at zope.com
Mon May 12 17:45:34 EDT 2003


Rocky Burt wrote:
> I'm not really understanding what you're suggesting here...
> 
> Let me try to explain what I see as what's going on...
> Looking at things from a purely object retrieval perspective, it seems
> to me that the (de)serializing mechanism gets run too late for it to
> have anything to do with the schema of the database.

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.

> Correct me if I'm wrong, but here's what I understand that happens
> during a object retrieval:
>   1) zodb makes a request to the (ape) storage with some form of a
> load() call (providing an empty object as the shell to fill)
>   2) ape invokes the mapper framework (which in turn invokes the
> appropriate gateways) to actually retrieve a slightly formatted set of
> the data from the rdbms
>   3) ape uses the registered deserializer (registered to the mapper) to
> apply the results to an empty object (of the required type/class)
> 
> My understanding of the schema's are that they are merely a way for the
> serializers to understand the data coming from (going to) some gateways.

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

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?

Shane




More information about the ZODB-Dev mailing list