[Zope] ZCatalog + Directory product question

Júlio Dinis Silva juliodinis@hotmail.com
Tue, 15 May 2001 18:29:37 +0100


Hi,

supose you have a product with two classes:

MyCategory
   |
   ---------- MyLink

Both classes are CatalogAware.
The ideia of this classes is to implement
a Directory like yahoo (think about the Yiahw product).

Now I start creating my Directory.
My classes have a property "active" that I use
to activate and deactivate some parts of my Directory.

Now I want to search in my Catalog in which I have MyCategory and
MyLink instances catalogued.

When I do a search I want to retrieve only results with the
"active" property "on". This is ease no big deal. But I want to guarante 
that all PARENTS of a given Mylink are all with active property "on". Yes no 
big deal, for each result from my search I
run trough the getPath(data_record_id) or even PARENTS and check for each 
Parent if they are all with active==on.

Well the problem arises when you have 30 results in your search and
all are Mylinks in a directory depth path of 10 category... The search
becomes to heavy,i.e, scalability is compromised.

I'm thinking I could use the zope security engine to do the active/deactive 
trick, i.e, when I deactivate one MyCategory I uncheck some security entry, 
then listing my directory I do a dtml-in with skip-unauthorized, and when I 
do a search I try to getObject MyLink's
results as a anonymous role and then skip_unauthorized.

I think this skip_unauthorized could be the solution for this
ZCatalog+Directory product scalability, because instead of running
trough the PARENTS and check a property, I will be using zope's
internal security mecanism.

Any hints,
Júlio Dinis Silva
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.