[Zope3-dev] Re: Object hub?
Garrett Smith
garrett at mojave-corp.com
Mon Dec 29 11:56:29 EST 2003
We use the object hub extensively as an inventory of objects. What is
the recommended 'best practice' here? Continue using the hub, but just
as a utility? Or create and maintain our own hub service/index?
Will the object hub utility be available by default in the bootstrapped
Zope 3 site?
-- Garrett
Jim Fulton wrote:
>
> The original puroses for the object hub were:
>
> 1. To allow location-independent object references. These were
> references that remained valid even if the referenced object
> was moved.
>
> This need is now supported through direct object references,
> which were made possible through parentgeddon. You can now
> have a direct reference to an object without losing location
> information.
>
> 2. Track containment or location relationships.
>
> This is now handled through ILocation/IContained
> and ISublocations/IContainer.
>
> 3. Provide compact identifiers for use in indexing.
>
> Having this broken out into a separate component (versus
> providing the capability as an internal catalog implementation
> as was done in Zope 2), supports cross-index/cross-catalog
> merges.
>
> I think that there is still a role for an object hub, although
> it is now a much smaller role, and far less central.
>
> I propose to to do away with the object hub as a service, replacing it
> with a utility.
>
> I further suggest that provide a two-way mapping between object references
> and short ids (integers).
>
> We will define an interface (like):
>
> class IObjectReference(IHashKey, IPicklable):
> """An object reference
> """
>
> def __call__():
> """Return the referenced object
> """
>
> When we register the object with the utility, we'll adapt it to this
> interface
> to get a reference.
>
> Jim
>
More information about the Zope3-dev
mailing list