[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 , 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 script execution timeout

2001-02-14 Thread Júlio Dinis Silva

Hi,

first a more python/httplib.py specific question: I know
there has been a patch for this module to support socket timeout
exception but I cant find the bastard. Anyone?

I can see that in Python2.0 the urllib module now has a timeout 
implementation but is it safe to replace urllib.py from 2.0 in zope's
python modules? I know... I will try it... but if someone has any experience 
in this would help.

Now more zope/Zserver specific: ZServer/medusa has a timeout option,
I reduced this value but that just doesnt seems to work, I still have zombie 
channels running for days.

Meanwhile I'm working on a External Method that imports Zhttpserver stuff 
where I can enter in the zope's channels poll and find the
zombie ones and hopefully killing/closing the bastards, thats just what 
Zserver.maintenance() should do but doesnt.

A final point is I know in unix I could use the signal module
but I'm working on NT (dont laugh like a drain please :-), which doesnt 
support signals but supports a "structured exception handling"
(whatever this means...), bottom line, is there a signal like module
in python working on NT that I could use to for instance wrap httplib and 
urllib calls?

Any comments?
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 )



[Zope-dev] Fwd: [Zope-ZEO] zope+zodbc+zeo issues

2001-02-02 Thread Júlio Dinis Silva




>From: "Júlio Dinis Silva" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [Zope-ZEO] zope+zodbc+zeo issues
>Date: Wed, 31 Jan 2001 18:46:16 -
>

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



Hi,
We are running for some months a zeo-based site where clients have a zodbc connection
to mssqlserver. We had  defined a big value for the clients cache, but recently we drastically decrease that value due to memory problems.
The problem we are debugging now is that once in a while one of the clients became zombie
and going to a good client and doing the "close zodbc connection" the zombie one start moving ok.
So what is happening here? We think since we decrease the size of our clients cache, activity
in sqlserver is now bigger, so clients request more often sql executions.
We believe there is something wrong having this zodbc object shared by zeo clients where
each one of the clients have a NT ODBC DSN source to the sqlserver.
So question is: is it safe to share the same odbc adapter connection with zeo clients or one should take some special care. We are moving into trying to put each client using each own
zodbc connection. Dont ask me how cause we are going to hit it with a large hammer.
Any comments?
thanx,
Julio Dinis Silva
 
ps. sorry if this message goes in html format cause this fuc. hotmail webmail client now
has a activex object that I cant disable.
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

___
Bug reports, feature requests, etc. go in the ZEO Tracker:
http://www.zope.org/Products/ZEO/Tracker

Conversations etc. can take place in the Wiki:
http://www.zope.org/Products/ZEO/Wiki

Zope-ZEO maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-zeo





[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 )




[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] kill_zombies

2000-12-20 Thread Júlio Dinis Silva

Hi,

since I started to use zeo, my medusa debug, /status/close_zombies
stop to work. Is there another way to call this method close_zombies
or kill_zombies?

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 )