Re: Caching query results

From: Aristedes Maniatis (ar..sh.com.au)
Date: Mon Sep 25 2006 - 09:34:01 EDT

  • Next message: Andrus Adamchik: "Re: Caching query results"

    On 25/09/2006, at 10:41 PM, Francesco Fuzio wrote:

    > <<It is important to understand that caching of *result lists* is
    > done independently from caching of *individual DataObjects and
    > DataRows*. Therefore the API is different as well. Also cached
    > results lists _are not synchronized across VMs (even the shared
    > cache)._>>_
    >
    > _So it seems that if my application is deployed in a cluster I have
    > to implement a custom _distributed_ invalidation mechanism.

    It depends on how important it is that the data is up to date. One
    solution might be to add functionality to Cayenne which invalidates
    objects in the cache after a certain period of time (for instance 1
    hour). It is now possible to invalidate objects one at time (http://
    cwiki.apache.org/confluence/display/CAYDOC/RefreshQuery)

    We are examining the same problem in our application (not a web
    cluster, but a client/server application). For now we switched off
    caching, but we need to think through the issues. One solution is to
    implement a distributing messaging system to send notifications
    between clients - I think Andrus was looking at XMPP at one time
    (http://www.xmpp.org/summary.html) for this. Certainly it would be
    handy if a messaging system was built into Cayenne for this. It would
    also be useful for things like pessimistic locking.

    Ari Maniatis

    -------------------------->
    ish
    http://www.ish.com.au
    Level 1, 30 Wilson Street Newtown 2042 Australia
    phone +61 2 9550 5001 fax +61 2 9550 4001
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A





    This archive was generated by hypermail 2.0.0 : Mon Sep 25 2006 - 09:35:09 EDT