[Zope-dev] Fwd: [Zope] ZCatalog + Directory product question

2001-05-17 Thread Júlio Dinis Silva

Any hints?
Best Regards,
Julio Dinis Silva


From: Júlio Dinis Silva [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [Zope] ZCatalog + Directory product question
Date: 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.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] zserver medusa timeout? anyone?

2001-03-22 Thread Júlio Dinis Silva

Hi,

I would like to know if ANYONE has ever put timeout parameter
of ZServer/Medusa to work, i.e, if changing this timeout value to a low 
value and actually seen it to work, i.e, closing zombie channels.
Anyone done this? I've tryed almost everything on my limited knowledge
of zope/python, creating zombie requests running in a zserver with a  
timeout=realylowvalue but the request was never closed.
Maybe I'm realy missing something here.

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


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] New Zcatalog bug on b2?

2001-03-16 Thread Júlio Dinis Silva

When passing in the REQUEST the var sort_on into the
searchREsults method I get this error:

Zope Errorr

Zope has encountered an error while publishing this resource.

Error Type: TypeError
Error Value: len() of unsized object

With this traceback:

Traceback (innermost last):
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 223, in publish_module
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 187, in publish
  File /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Zope/__init__.py, 
line 221, in zpublisher_exception_hook
(Object: Traversable)
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 171, in publish
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/mapply.py, line 
160, in mapply
(Object: executeSearch)
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 112, in call_object
(Object: executeSearch)
  File /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/OFS/DTMLMethod.py, 
line 189, in __call__
(Object: executeSearch)
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_String.py, 
line 538, in __call__
(Object: executeSearch)
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_Let.py, 
line 146, in render
(Object: Results="Catalog(REQUEST=REQUEST)")
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, 
line 334, in eval
(Object: Catalog(REQUEST=REQUEST))
(Info: REQUEST)
  File string, line 0, in ?
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/ZCatalog.py, 
line 530, in searchResults
(Object: Traversable)
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/Catalog.py, 
line 654, in searchResults
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/Catalog.py, 
line 591, in _indexedSearch
TypeError: (see above)









_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] kill Zserver zombie channels

2001-02-20 Thread Júlio Dinis Silva

Hi,

blatantly taken from ZServer/HTTPServer.py and adultered is this code to 
kill zhttp channels used in zope by way of an external method:

def killzombies():
import ZServer
from ZServer import HTTPServer
from ZServer import medusa
from ZServer.medusa import asyncore
from ZServer.medusa import http_server

for channel in asyncore.socket_map.values():
if channel.__class__ == HTTPServer.zhttp_channel:
channel.close()

return 1

I ignore here the zombie_timeout, Im just killing all channels.
The problem is that I also kill the main python process.
I would apreciate if any zserver/medusa guru can iluminate my mind
on what I'm doing wrong here. In this code I only close
zhttp_channels and not zhttp_server ones, so I dont understand why the
server is also closed.

Thanx for comments,
Júlio Dinis Silva
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Zope max script execution time?

2001-01-12 Thread Júlio Dinis Silva

Is there a way to define a timeout for zope methods, documents?
Thanx,
Júlio Silva
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] How to delete ZServer's zombie channel?

2001-01-12 Thread Júlio Dinis Silva

Hi,

some time I see in my /Control_Panel/DebugInfo/manage,
channels opened longer than 48378.26s. How can I kill/delete a
specific channel?

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


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )