[ZODB-Dev] Ape questions

Shane Hathaway shane@zope.com
Fri, 04 Apr 2003 11:46:11 -0500


Rocky Burt wrote:
> I have a question about caching with Ape.  This may actually apply to
> any Storage implementation, I'm not sure.
> 
> I want to do something along the lines of this clustered configuration.
> 
> 1) zopeserver1, zopeserver2, zopeserver3 all connect to zeoserver1
> 2) zopeserver4, zopeserver5, zopeserver6 all connect to zeoserver2
> 3) zoeserver1 and zeoserver2 run their own root Data.fs' but connect to
> sqlserver1 to read a common set of business data (via Ape)
> 
> What clustering could/should I enable there?  Clustering on the zeo
> servers?  Obviously having to run with caching turned off will be a
> major performance blow.  Also, is more work required (or is it even
> possible) to have both the zeo servers talk to the same sql database to
> get data via Ape?

One thing that isn't clear is whether Zope has control over the SQL 
databases, and if it does not, you still need to decide whether Zope 
should see changes made to the SQL database immediately.  If only Zope 
is allowed to write to the database (or certain tables), you can cache 
everything and get nice performance.  On the other hand, if Zope is only 
allowed to read the database, you can have a short-lived cache and get 
almost the same benefit.

If both Zope and other apps must read and write, you need Ape developed 
further.  At the beginning of each transaction, Ape should quickly ask 
the database what has changed since the last transaction.  Then Ape 
should flush specific cache entries.  Unfortunately, this is one feature 
that I can't find in any relational database.  You always have to cobble 
something together that's specific to your schema.  *Doesn't someone 
know of a way to do this?*

Shane