[Zope3-dev] Re: ObjectHub should change data structure

Jim Fulton jim@zope.com
Fri, 27 Jun 2003 05:48:51 -0400


Gary Poster wrote:
> Hi all.  We built the ObjectHub services as a hubid->path mapping.  This 
> was appropriate as a "get it done" solution.  Now it's time to optimize, 
> and to consider a more scalable solution, in which a renaming or moving 
> of a parent folder with tens of thousands of objects does not cause a 
> large amount of data churn.

If what you mean by data churn is interacting with each of the contained
objects, I'm not sure this is avoidable.  The issue is much bigger
than hub information. There are other objects beyond hubs that care
when objects change their location.  We also have hooks need to potentially
be called on each object.

I've been wrestling with how to deal with this issue. Specifically about
what events get generated and what hooks get called when you:

- Delete a container with subobjects

- Move a container with subobjects

- Copy a container with subobjects

- Restore/import a container with subobjects

This turns out to be very tricky.

I guess I shoukd write up an issue paper on this.


> I propose that a linked list mapping of hubid->(name, parent_id) (and 
> reverse) is a better solution. 

What would the reverse be?

   name -> child_ids?

This would be more or less equivalent to Zope 3 path indexes.

I've been thinking along these lines a bit myself.

I'm not sure it's an improvement though. Some ore detailed analysis
would be needed.

In any case, I don't really see that the hub data structure affects
object churn that much.

Or are you just thinking of churn *within* the hub?

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (703) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org