I am new to ZODB and to this list: greetings.

I need to get some points clear about precisely when objects are fully
instantiated in memory. It may be a simple matter of pointing me at some
documentation; I read pretty much anything I could find but there may a
problem of your jargon being different from mine:)

The main data structure of my application is a directed graph of nodes;
each node has at least three slots which contain other nodes (e.g.
parent, right child, left child; the parent always exists, the child 
slots may be None). I only want to instantiate that part of the graph 
that I am working on.

Q1. I assume that when an object is instantiated, its "sub" objects will
be in the form of some kind of proxy (perhaps that ghost I met in the
ZODB How document?). Is this assumption correct?

Q2. Given an object, designated by the variable a, in which of the
following statements does the child become instantiated (activated?) ?
child = a.leftchild
name = child.name

Q3. Actually, before the child is instantiated, I somehow would like to
query the object a, whether there is anything in the slot, i.e. whether
the content of the slot is not None. Of course, this query should not
trigger the instantiation.

I had the application running in another OO language. An object would
first carry a proxy with the OID in a slot; it would get instantiated on
access. The ad-hoc database made use of the Reiser file system, which
allowed indexing serialized objects on their OID in a B tree.
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to