jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Engen <ben...@nighthawkrad.net>
Subject Remote cache client sync
Date Wed, 20 Jan 2010 15:08:02 GMT
Hello all,

I'm implementing JCS as a caching solution in a new project.  I am wondering if there is an
out-of-the-box way to synchronize client caches with remote server caches.  The scenario being
my server will always be running and any number of clients may be connected at any given time
making changes to the objects cached on the remote server.  If a client is offline during
such changes, their cache needs to receive these updates somehow when they come back online.

I know I could simply clear the disk cache on startup but, for my purposes, that defeats the
purpose of the cache.  I haven't seen anything in the API or docs to do this so I've looked
at using a simple versioning system similar to svn.  The idea being each client would keep
track of its cache "revision" and when they come online, ask the server (via web service)
what objects have a higher revision number than their local  cache's global revision number.
 We are currently using the object's update time in ms from the db as its revision number
and the cache's global revision is equal to the Math.max of all the cache element's revisions.
 I could easily calculate this on any local cache put.  However, I don't see where I can add
an event listener to be notified when the server's remote cache pushes updates down to the
client to update my cache's revision.

Any thoughts on this issue?


Brian Engen
Software Engineer
NightHawk Radiology Services
215 N Water St.  Suite 500
Milwaukee WI 53202
Direct: 414-921-2285
Toll Free: 866-400-4295
Fax: 414-220-4296

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message