[Zope] [Catalog/ZCatalog] external RID references: bad idea?
Casey Duncan
cduncan@kaivo.com
Wed, 15 Aug 2001 10:13:56 -0600
Gary Poster wrote:
>
> Hi.
>
> Faced with a need to make large numbers of references to objects within
> other objects, wanting to get certain information about the linked objects
> without waking them up in the ZODB, etc., and wanting to store the
> references efficiently, I thought that the Catalog might be an avenue to
> explore, since it had solved some somewhat similar issues. So I studied it.
> Interface declarations will make these kind of questions a bit more
> straightforward in the future, but for now...
>
[snip]
Another option to explore might be to store the oid (a unique 8 byte
string generated for each object by the ZODB) as the reference along
with some cached metadata that you'll lookup often. You can use the ZODB
connection object (stored in a persistent object's _p_jar to lookup
another object by oid, it acts like a big dictionary).
All persistent objects in a ZODB have a _p_oid attribute that contains
the oid value.
Perhaps describing your application in more detail would yield better
ideas...
--
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>