[Zope-dev] Question about Labels

2000-09-22 Thread Andre Schubert

Hi,

I have a Product with a Label called Foo. Now what can i do, that when
anyone clicked on the tab Foo first the function bar() is called and
after that the HTML-File is displayed.

as


manage_options =({'label':'Foo', 'action':'manage_propertiesForm'},)

def bar(self):
do anything before displaying the HTMLFile

def manage_propertiesForm(self,REQUEST):
""" doc string """
self.bar()
return HTMLFile('edit_NetzwerkForm', globals())


___
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] FTP behaviours

2000-09-22 Thread Robin Becker

Has anyone done any work in the area of ftp controlled behaviours? I
want to do something like check if an object is of a specific sort
before overwriting/creating and then take some additional actions.
-- 
Robin Becker

___
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] Previous versions of persistent objects

2000-09-22 Thread Robin Becker

Are there any methods to get access to previous versions of persistent
objects without actually carrying out the undo?
-- 
Robin Becker

___
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] Chameleon

2000-09-22 Thread Joachim Schmitz

Hi,

I just tried to use the chameleon product with zope 2.2.1 under SuSE 7.0.
After adding a new chameleon folder, I can't enter that folder, cause there
is always the authorisation-box opened. And I am not able to authorize. 
Can the chameleon product work with 2.2.x at all ?




Mit freundlichen Grüßen

Joachim Schmitz  

  
AixtraWare, Ing. Büro für Internetanwendungen
Hüsgenstr. 33a, D-52457 Aldenhoven  
Telefon: +49-2464-8851, FAX: +49-2464-905163


___
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] Shared Libraries and Persistent Objects

2000-09-22 Thread Monty Taylor

Hey guys,

I've got a question about how Zope deals with shared libraries. Say
I have a 2Meg shared library that I've generated with SWIG. (I know it's
big, but for sake of argument) Say then that I create a Python Class
that imports this library and provides a front-end for each of its
exported methods. Then, I instantiate this class 2000 times within a
Zope instance. My question is, the library code is loaded into memory
once, right? That seems to be what should happen, but I want to make
sure before I start selling people here on SWIGing a few utilities and
bundling them into one of our Zope objects instead of doing fork/execs
to call an executable. I'm not shifting the burden from loading time to
storage size, am I?

Thanks,
Monty


___
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] ZSQL Methods from Python?

2000-09-22 Thread Monty Taylor

Hey, is there any doco about using ZSQL Methods from Python Products?
Also, does anyone know of any work done to extend ZSQL Methods to allow
stored-procedure calls? I know I can do an Oracle Procedure call from
DCOracle that returns a cursor, but I'd love to combine that with the
caching/pluggable brains of ZSQL Methods. Is there anything out there on
this or am I going to have to roll my own?

Thanks,
Monty


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




Re: [Zope-dev] Shared Libraries and Persistent Objects

2000-09-22 Thread Jim Fulton

Monty Taylor wrote:
 
 Hey guys,
 
 I've got a question about how Zope deals with shared libraries. Say
 I have a 2Meg shared library that I've generated with SWIG. (I know it's
 big, but for sake of argument) Say then that I create a Python Class
 that imports this library and provides a front-end for each of its
 exported methods. Then, I instantiate this class 2000 times within a
 Zope instance. My question is, the library code is loaded into memory
 once, right?

Right. In fact, if you were running multiple Zope (or Python)
processes using the library, then there would only be one copy in 
memory shared among the multiple processes.

 That seems to be what should happen, but I want to make
 sure before I start selling people here on SWIGing a few utilities and
 bundling them into one of our Zope objects instead of doing fork/execs
 to call an executable. I'm not shifting the burden from loading time to
 storage size, am I?

No.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]
Technical Director   (888) 344-4332  Python Powered!
Digital Creationshttp://www.digicool.com http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

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




Re: [Zope-dev] ZSQL Methods from Python?

2000-09-22 Thread Monty Taylor

Jim Fulton wrote:

 Monty Taylor wrote:

  Also, does anyone know of any work done to extend ZSQL Methods to allow
  stored-procedure calls?

 No, but I'd love to see someone tackle it. The semantics
 of stored procedures varies so widely accross databases, that
 I doubt that it would be easiliy generalizable. I think, at
 least for starters, a form of stored procedure support for
 Oracle would make alot of sense.

  I know I can do an Oracle Procedure call from
  DCOracle that returns a cursor, but I'd love to combine that with the
  caching/pluggable brains of ZSQL Methods. Is there anything out there on
  this or am I going to have to roll my own?

 I think you'd have to roll your own. If you want to
 do something reusable that other people could use, I'd be
 happy to provide whatever advice and support I can.


I think I'd like to talk to you about this. We're about to work on
transitioning a web-based product to Zope, and we use Store Procedures
exclusively. I'd love to have the extra ZSQL goo instead of having to wrap
the code at such an individual level. Maybe we can stick someone on the task.
But I'm sure we'll need a guiding hand or two. All of this assumes I can get
past the basic problem that follows...


 Note that one of the things I like about Oracle's stored procedures
 is that they allow me to avoid screwing with cursors in the common case
 that I'm getting one row of data.  I can just get the data I need through
 a straight function call.  The DCOracleStorage uses stored procedures
 almost exclusively.



I've been looking through that code (we've started using DCOracleStorage on
the backend.) For some reason, though, I can't get the stored procedure stuff
to work like you do. Check out the following:

Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production

SQL desc pgm140_api;
PROCEDURE SELECT_TARGETS
 Argument Name  TypeIn/Out Default?
 -- --- -- 
 PP_NAMEVARCHAR2IN
 PP_RESULT  REF CURSOR  IN/OUT
RECORD  IN/OUT
 AMSM_IDNUMBER(12)  IN/OUT
 NAME   VARCHAR2(80)IN/OUT
PROCEDURE SELECT_TECHNOLOGIES
 Argument Name  TypeIn/Out Default?
 -- --- -- 
 PP_CATEGORYVARCHAR2IN
 PP_RESULT  REF CURSOR  IN/OUT
RECORD  IN/OUT
 ET_ID  NUMBER(12)  IN/OUT
 NAME   VARCHAR2(80)IN/OUT

*
Then from python, with the same connection string, I do:
Python 1.5.2 (#1, Feb 14 2000, 18:27:27)  [GCC 2.95.1 19990816 (release)] on
sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
 import DCOracle.oci_
 conn=DCOracle.Connect('')
 pgm140_api=getattr(conn.procedures,'pgm140_api')
 sql_select_targets=getattr(pgm140_api, 'select_targets')
Traceback (innermost last):
  File "stdin", line 1, in ?
  File "/apps/zope/lib/python/Products/ZOracleDA/DCOracle/ociProc.py", line
324, in __getattr__
oci.error: no usable procedure named pgm140_api.select_targets


I've tried using all caps on one or both as well to no avail. Any thoughts?

Monty


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




Re: [Zope-dev] ZSQL Methods from Python?

2000-09-22 Thread Jim Fulton

Monty Taylor wrote:
 
 Jim Fulton wrote:
 
(snip)
  Note that one of the things I like about Oracle's stored procedures
  is that they allow me to avoid screwing with cursors in the common case
  that I'm getting one row of data.  I can just get the data I need through
  a straight function call.  The DCOracleStorage uses stored procedures
  almost exclusively.
 
 
 
 I've been looking through that code (we've started using DCOracleStorage on
 the backend.) For some reason, though, I can't get the stored procedure stuff
 to work like you do. Check out the following:
 
 Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
 With the Partitioning option
 JServer Release 8.1.6.0.0 - Production
 
 SQL desc pgm140_api;
 PROCEDURE SELECT_TARGETS
  Argument Name  TypeIn/Out Default?
  -- --- -- 
  PP_NAMEVARCHAR2IN
  PP_RESULT  REF CURSOR  IN/OUT
 RECORD  IN/OUT
  AMSM_IDNUMBER(12)  IN/OUT
  NAME   VARCHAR2(80)IN/OUT
 PROCEDURE SELECT_TECHNOLOGIES
  Argument Name  TypeIn/Out Default?
  -- --- -- 
  PP_CATEGORYVARCHAR2IN
  PP_RESULT  REF CURSOR  IN/OUT
 RECORD  IN/OUT
  ET_ID  NUMBER(12)  IN/OUT
  NAME   VARCHAR2(80)IN/OUT
 
 *
 Then from python, with the same connection string, I do:
 Python 1.5.2 (#1, Feb 14 2000, 18:27:27)  [GCC 2.95.1 19990816 (release)] on
 sunos5
 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
  import DCOracle.oci_
  conn=DCOracle.Connect('')
  pgm140_api=getattr(conn.procedures,'pgm140_api')
  sql_select_targets=getattr(pgm140_api, 'select_targets')
 Traceback (innermost last):
   File "stdin", line 1, in ?
   File "/apps/zope/lib/python/Products/ZOracleDA/DCOracle/ociProc.py", line
 324, in __getattr__
 oci.error: no usable procedure named pgm140_api.select_targets
 
 I've tried using all caps on one or both as well to no avail. Any thoughts?

I suspect that the problem is the RECORD argument type. I don't
remember off-hand what this is, but I'm pretty sure, the DCOracle
procedure code doesn's handle this type. We (you;) would need to
either work around this or fix it.  Unless the fix is easy though,
we might want to wait for an OCI8-based Oracle interface that
someone here is rumored to be working on. :) (Actually, I *know*
that someone's working on an OCI 8 interface, but I'm not sure
what the status or priority is.)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]
Technical Director   (888) 344-4332  Python Powered!
Digital Creationshttp://www.digicool.com http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

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




Re: [Zope-dev] I feel your Wiki Pain ;-)

2000-09-22 Thread Simon Michael

I like where you're going with this Martijn.

Spurred on by your concrete examples, how about this: every wiki page
has an email address and functions as a "mailing list". Eg: I could
subscribe or send edits to

ZWikiWeb:[EMAIL PROTECTED]
StructuredTextWiki:[EMAIL PROTECTED]
[EMAIL PROTECTED] (defaults to the front page)

A zwikiweb could be seen as a hierarchy of very lightweight mail
lists. When I subscribe to a page(list), I would also receive
edits(mail) to its child pages(lists) by default.

Implementation: a sufficiently smart mail server, or (better?) build
on the "mail into zope" project for an all-zope solution. Eg: I might
install and configure the "ZWikiMail" product, and suddenly my
existing wikis are mail-enabled..

Comments ?

-Simon

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




Re: [Zope-dev] Re: [Zope-ZEO] Advice

2000-09-22 Thread Steve Spicklemire


We're using ZCVSMixin for just such a scenario. It's working a 
lot better than nothing. ;-) It does still have rough edges, and you
need to know too much about how it works to do anything complex, but
it does allow us to manage changes and test/stage/update etc with
a much greater degree of control than we used to have... Of course
right now it's unix only... but I should be able to fix that once
my current slate of projects are finished.

-steve

 "Andy" == Andy McKay [EMAIL PROTECTED] writes:

  One of the reasons our group is moving away from Zope is that
 it has  very poor support (if any) for the
 development/staging/live model.  We  like this model.  We
 think it's a good thing.  But sync'ing code across  multiple
 Zope installations is a royal PITA.
 
 I'd like to hear more about the problems you've had and how you
 overcome them in a different system.
 
  And no, versions are *not* the answer.
 
 Well, they are a pretty good answer for lots of applications in
 my experience.

Andy Version can work for small changes, but they certainly dont
Andy for large numbers of changes across lots of objects. And
Andy since the catalog is a key component for our site, its a
Andy real problem.


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


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




Re: [Zope-dev] ZSQL Methods from Python?

2000-09-22 Thread Phillip J. Eby

At 08:43 AM 9/22/00 -0400, Jim Fulton wrote:
 Also, does anyone know of any work done to extend ZSQL Methods to allow
 stored-procedure calls?

No, but I'd love to see someone tackle it. The semantics
of stored procedures varies so widely accross databases, that
I doubt that it would be easiliy generalizable. I think, at
least for starters, a form of stored procedure support for
Oracle would make alot of sense.


Ty and I have put together a Stored Procedure method for Sybase; it
requires a minor patch to ZSybaseDA, however, to allow for the status code
return.  I'm not sure how useful it would be to anyone else, though, since
all we ever do with stored procedures is process the return value, and
ignore any actual SELECT results.


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




Re: [Zope-dev] ZSQL Methods from Python?

2000-09-22 Thread Jim Fulton

"Phillip J. Eby" wrote:
 
 At 08:43 AM 9/22/00 -0400, Jim Fulton wrote:
  Also, does anyone know of any work done to extend ZSQL Methods to allow
  stored-procedure calls?
 
 No, but I'd love to see someone tackle it. The semantics
 of stored procedures varies so widely accross databases, that
 I doubt that it would be easiliy generalizable. I think, at
 least for starters, a form of stored procedure support for
 Oracle would make alot of sense.
 
 
 Ty and I have put together a Stored Procedure method for Sybase; it
 requires a minor patch to ZSybaseDA, however, to allow for the status code
 return.  I'm not sure how useful it would be to anyone else, though, since
 all we ever do with stored procedures is process the return value, and
 ignore any actual SELECT results.

I think it would be useful. Can you get multiple return values?

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
Technical Director   (888) 344-4332http://www.python.org  
Digital Creationshttp://www.digicool.com   http://www.zope.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

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




Re: [Zope-dev] ZSQL Methods from Python?

2000-09-22 Thread Phillip J. Eby

At 12:49 PM 9/22/00 -0400, Jim Fulton wrote:
"Phillip J. Eby" wrote:
 
 Ty and I have put together a Stored Procedure method for Sybase; it
 requires a minor patch to ZSybaseDA, however, to allow for the status code
 return.  I'm not sure how useful it would be to anyone else, though, since
 all we ever do with stored procedures is process the return value, and
 ignore any actual SELECT results.

I think it would be useful. Can you get multiple return values?


By "return value", I mean the "return status" code which is an integer
returned by the Sybase "RETURN" statement.  Sybase also can generate its
own, negative-numbered return statuses, which indicate a Sybase error.
These error codes can include ones that mean the current transaction has
already been aborted.

Apart from the "return value", a Sybase stored procedure can execute
SELECT's which result in rows being returned.  We have never used this
capability, so I'm not sure what would need to be done for it to be
practical.  We ordinarily use stored procedures only to perform inserts,
updates, deletes, and other things that only need a integer result if
anything.  (Eg: get next counter value to assign an object identifier.)


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




Re: [Zope-dev] ZSQL Methods from Python?

2000-09-22 Thread Jim Fulton

"Phillip J. Eby" wrote:
 
 At 12:49 PM 9/22/00 -0400, Jim Fulton wrote:
 "Phillip J. Eby" wrote:
 
  Ty and I have put together a Stored Procedure method for Sybase; it
  requires a minor patch to ZSybaseDA, however, to allow for the status code
  return.  I'm not sure how useful it would be to anyone else, though, since
  all we ever do with stored procedures is process the return value, and
  ignore any actual SELECT results.
 
 I think it would be useful. Can you get multiple return values?
 
 
 By "return value", I mean the "return status" code which is an integer
 returned by the Sybase "RETURN" statement.  Sybase also can generate its
 own, negative-numbered return statuses, which indicate a Sybase error.
 These error codes can include ones that mean the current transaction has
 already been aborted.
 
 Apart from the "return value", a Sybase stored procedure can execute
 SELECT's which result in rows being returned.  We have never used this
 capability, so I'm not sure what would need to be done for it to be
 practical.  We ordinarily use stored procedures only to perform inserts,
 updates, deletes, and other things that only need a integer result if
 anything.  (Eg: get next counter value to assign an object identifier.)

Ah, too bad. Can Sybase *only* return values through selected rows?

Oracle's stored procedures are much more like traditional procedures
and therefore extremely useful even when no results are returned.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
Technical Director   (888) 344-4332http://www.python.org  
Digital Creationshttp://www.digicool.com   http://www.zope.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
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] ftp-acces to Zope: rename command

2000-09-22 Thread Klaus Woelfel

Hi,
I have the following problem:
One great thing in Zope is the ftp acces to objects. And in combination
with the ftp-abilities of kfm and kwrite in kde1.2 it worked very nice for me
to edit DTML-Documents in kwrite.

But now in kde2 the the i/o System of kde (kio) has changed and when I
edit an DTML-Document with kwrite in kde2 and want to save, kwrite (in fact
kio) first creates a new file named file_name.part and then renames it to
file_name.

No the problem is that the ftp part of ZServer doesn't support to rename
an object. When I type "rename file file_old" in the linux terminal-ftp
client, he says: "500 'RNFR': command not understood."

So I'm asking if anybody knows how to solve this problem, or if there is
anybody who can tell me where in the source of Zope I have to look to
implement the "rename" command in ZServer. On the IRC Zope-cannel they told
 me that this wouldn't be too difficult. But maybe it is already implemented
 an I only have to activate it...

Bye,
Klaus

___
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] Do I really understanding caching?

2000-09-22 Thread Andy McKay

We have been looking at caching in Zope as a way of tweaking performance.
Heres an example of what I think happens:

- Supposing I have a 1,000 object catalog. If one person changes an catalog
aware object, that instance of the catalog will be pulled out of the ZODB
and changed. It will then be written to the ZODB. That last copy will stay
in the cache for as long as the "Cache Parameters" are set to allow.

- If somebody changes another catalog aware object, that will repeat the
above process.

- However simply accessing the catalog (no changes) will pull the object
from the cache.

- What would be really nice is if the object only got written to the cache
when it is no longer used, that way every time the catalog changed it didnt
write to ZODB instead it changed the cached version. Of course that does
bring up the recovering from disaster problem.

So do I understand it correctly?

--
  Andy McKay, Developer.
  ActiveState.


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




Re: [Zope-dev] Do I really understanding caching?

2000-09-22 Thread Andy McKay

Thanks
 
 (I'm only talking about text indices here.)
 
 Note that the Catalog is actually a tree of database/cache objects. 
 There are a series of buckets and sub-buckets that end in a word
 object.  The buckets, sub-buckets, and words are all database objects
 and can be cached/updated separately.
 
 Put another way, every branch and leaf on the tree in a Catalog is a
 separately stored and cached database object.
 
 The 1,027 words in the document (and the branches on the tree to get to
 them) that was updated would obey the cache parameters.

Hmm, that is a significant optimization, and one I was not aware of.
 
 What problem are you trying to solve -- response time, memory usage,
 disk usage?

All of the above :)



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




Re: [Zope-dev] Do I really understanding caching?

2000-09-22 Thread Chris McDonough

Statement of possible BS: I am speaking from how I understand the
catalog
to work, and possibly not how it actually *does* work. :-)

Andy McKay wrote:
 
 We have been looking at caching in Zope as a way of tweaking performance.
 Heres an example of what I think happens:
 
 - Supposing I have a 1,000 object catalog. If one person changes an catalog
 aware object, that instance of the catalog will be pulled out of the ZODB
 and changed. It will then be written to the ZODB. 

Actually, a subobject of the catalog which is stored in a BTree will
change,
and the Catalog instance will change, but it will not write the entire
contents of the catalog back out to the ZODB.  The current BTree
implementation has some problems, so other unrelated objects in it may
be
changed on the write.  This will be solved by updates to the catalog
which use a new "broadtree" BTree implementation.

 That last copy will stay
 in the cache for as long as the "Cache Parameters" are set to allow.

The changed subobjects will, yes.  Unless they're manually ghosted for
some other reason (rarely happens, if ever).

 - If somebody changes another catalog aware object, that will repeat the
 above process.

Yes.

 - However simply accessing the catalog (no changes) will pull the object
 from the cache.

Yes.

 - What would be really nice is if the object only got written to the cache
 when it is no longer used, that way every time the catalog changed it didnt
 write to ZODB instead it changed the cached version. Of course that does
 bring up the recovering from disaster problem.

This would break transactional integrity.  It's important that the
catalog
is in a self-consistent state as well as be consistent with other
objects in the ZODB, and transactions help to maintain this.

Is it essential that all your cataloged objects be catalog-aware?

-- 
Chris McDonough
Digital Creations, Publishers of Zope
http://www.zope.org

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