[Zope-dev] Declaring Dependencies for XML documents (Was: How To Improve CacheCoherency for RAM/Disk Cache Manager...?)

2003-03-03 Thread Craeg K Strong
Jamie Heilman wrote:

Why make the unlucky user pay the price?
   

Because the unlucky user (which I read as: author) is the only one who
knows the required behavior of their code.
 

Allow me to clarify -- I meant the end user browsing the website.
I hate it when I surf to a less-highly-used portion of a website and
have to wait 30 seconds for the page to render.  

Anyway, after talking this over with my colleague, I realize that
the problem of *deriving* dependencies is fundamentally undecidable.
We might be able to figure it out in the case of simple acquisition,
like 

 

But it is hopeless for pure python:


:)
One possibility is to add the ability to *declare* dependencies.
I thought of doing that for an X-path aware "XML Composite Document"
object.   It is an object that produces a valid XML document by grabbing
parts of other Zope objects via XPath/XPointer/XInclude.  

Such an object could have an explicit listing of the objects on
which it depends, and invalidate the cache appropriately whenever
any of the dependent objects changed.
http://www.zope.org/Members/faassen/SimpleCache

Is a nice beginning along these lines.

Thoughts?

--Craeg



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


Re: [Zope-dev] How To Improve Cache Coherency for RAM/Disk Cache Manager...?

2003-03-03 Thread Jamie Heilman
> Why make the unlucky user pay the price?

Because the unlucky user (which I read as: author) is the only one who
knows the required behavior of their code.

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


[Zope-dev] How To Improve Cache Coherency for RAM/Disk Cache Manager...?

2003-03-03 Thread Craeg K Strong
Hello:

I am getting ready to release the next version of XMLTransform, and in
revisiting the Caching strategy for the product, I realized there are larger
issues that probably deserve a discussion here. 

The bottom line is that transforming XML to something else via
XSLT is a potentially expensive operation, so that caching the results
is often worthwhile.
As I thought about the problem, I realized that this probably holds true
for any sufficiently dynamic site where you employ caching because:
- the cost of processing exceeds the cost of retrieval from cache by at 
least
an order of magnitude
- there are many more readers than writers

Question:  How can we ensure cache coherency?

For example, you might have a ZPT that includes the results of several
long-running PythonScripts, whose rendered result is cached. 
What happens when the code for those
PythonScripts changes?  Worse, what happens when the SQL data
retrieved by the Z SQL Method that the PythonScripts operate on
changes?

Correct me if I am wrong, but today the Zope Cache Management facility
takes into account changes in cached objects, but not objects on which they
depend.
One strategy for accounting for this problem is to invalidate objects in 
the cache
based on a certain interval.  That way objects are out of date for at 
most the
length of the interval.  This could be called the "pull" or reactive model.

Alternatively, Cacheable objects might be somehow aware of the objects 
on which
they depend, and invalidate themselves in the cache when one of their 
dependent
objects changes.  This could be called the "push" or proactive model.  
Depending on
some parameters, they might even recalculate their results proactively 
so they
could be re-cached immediately.  Why make the unlucky user pay the price?

The latter alternative is not infeasible.   DTML and ZPT scripts must parse
their contents in order to render, so the information is available 
somewhere.

The question is: can/should this be addressed for Zope2?  What about Zope3?
Is one model more appropriate for a development setting (equal numbers 
of writers and
readers) vs production (many more readers, few or no writers)?

Any thoughts or sage advice on this topic would be much appreciated!

Regards,

--Craeg

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


Re: [Zope-dev] Prevayler and "Object Prevalence"

2003-03-03 Thread Toby Dickenson
On Monday 03 March 2003 3:48 pm, John Ziniti wrote:
> Any ZODB developers read this article at /. and the accompanying
> one at developerWorks?  Would anyone care to comment about
> the relevance/comparisons of "prevalence" to the concepts of
> persistence used in ZODB and/or ZEO?

I had looked at this (and the python port) briefly last year 

The main advantage of ZODB over a relational approach is that it can 
*automaticly* add ACID conditions to application logic objects, without major 
code changes. It is possible to think about your application logic and ignore 
the ODB aspects. Until recently, using a relational store for objects meant 
adding intrusive persistence code and breaking encapsulation.

As I understand it, prevayler preserves encapsulation, but still requires the 
intrusive code changes. It relies on separating appliction logic from the 
object store. Application logic can only read and write to the object store 
using remote method calls, which prevayler calls persistent  "command  
objects". Commands are processed  by a single threaded server process. 

Command objects have to be persisitent because durability is provided by 
writing them to a log file, and replaying commands on recovery. There is no 
way to apply transactional semantics to application logic, except by cramming 
all the work into one big command object.

(I hope that helps. Appologies in advance for any inaccuracies)

-- 
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson

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


[Zope-dev] Prevayler and "Object Prevalence"

2003-03-03 Thread John Ziniti
Any ZODB developers read this article at /. and the accompanying
one at developerWorks?  Would anyone care to comment about
the relevance/comparisons of "prevalence" to the concepts of
persistence used in ZODB and/or ZEO?
http://developers.slashdot.org/article.pl?sid=03/03/03/1220222&mode=nested&tid=156&threshold=1

Just looking for some info.

Thanks in advance,

JZ

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


[Zope-dev] HTTP Response headers in ZPublisher.HTTPResponse

2003-03-03 Thread Romain Slootmaekers
Yo,

the response headers set in ZPublisher.HTTPResponse our not always RFC 
compliant. In case of exceptions you get: (round lines 670 in 
HTTPResponse.py)

if ev.find( '') >= 0:
ev = 'bobo exception'
self.setHeader('bobo-exception-value', ev[:255])


If the content is a xml,wml,whtml,... page, this results in exception 
headers like:

Bobo-Exception-Value:   

while most browsers will not barf on this, we encountered numerous 
problems with wap-gateways refusing to swallow this.

Another question is whether it is wise to send things like
the file and line numbers where the exception took place to the client.
I can understand that it can be useful in debug mode, but I can't see a 
reason to do this in a production setup.

The simplest way of fixing this is to change the code to something like:

ev = 'bobo exception'
self.setHeader('bobo-exception-value', ev)
or to leave out these headers altogether.

Romain.





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


[Zope-dev] Re: [ZODB-Dev] standalone ZODB for large Numeric arrays

2003-03-03 Thread Mike Mueller

AFAICT, AdaptableStorage is designed to allow this kind of thing.
Shane?


Sounds interesting. I am going to search for this.


Yes, it is.  I don't know anything about NetCDF, but it sounds 
intriguing.  I guess NetCDF is not just an encoding format, but also some 
kind of database for large arrays.

Shane


http://my.unidata.ucar.edu/content/software/netcdf/index.html

NetCDF (network Common Data Form) is an interface for array-oriented data 
access and a library that provides an implementation of the interface. The 
netCDF library also defines a machine-independent format for representing 
scientific data. Together, the interface, library, and format support the 
creation, access, and sharing of scientific data.

Python interface is contained in Konrad Hinsens Scientifc package

http://starship.python.net/~hinsen/ScientificPython/

Mike



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