jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yaswanth <yaswanth.m...@gmail.com>
Subject Re: Does Remote Client gets acknowledgment from the Remote Cache for puts?
Date Fri, 20 Mar 2009 06:39:24 GMT


Thanks for the reply .. 

But that database option is not feasible for me .

K .. now lets think the other way .. Is it possible for the second client to
get notified when the first client puts a new Object into remote cache.. ?
Some listener kind of thing for call back ?


Niall Gallagher wrote:
> Hi Yaswanth,
> Cache "puts" are asynchronous i.e. JCS sends data to the remote server
> in a background thread. This will almost definitely cause the behaviour
> (race condition) you're seeing.
> Re: acknowledgements: someone else might answer that I'm not sure. My
> hunch is that perhaps your use case isn't appropriate for a distributed
> cache which does asynchronous puts. As a workaround your sender could
> write your data to a database which is synchronous and also put it into
> the cache. The receiver could then fetch it from the cache if available
> or from the database if not. Though this use case could mean that you'll
> have a low cache hit rate on this data due to the race condition you're
> seeing.
> Niall
> On Thu, 2009-03-19 at 02:16 -0700, Yaswanth wrote:
>> Hi , 
>> I have implemented Remote Cache with two clients and one Server. 
>> First Clients puts an Object into the Cache and sends the key over JMS to
>> the second Client. Using which Second Client gets that Object from the
>> Remote Cache . 
>> This entire thing is working for me on low loads .. When i load the
>> system.
>> I observed that Second Client retrieves few null messages from the remote
>> cache..
>> My guess is that it would be only possible if the Second Client is trying
>> to
>> retrieve the Object even before the First Client puts into remote Cache.
>> Is there anything(something like acknowledgments) with which i can ensure
>> in
>> the Fist Client that i send the JMS Message  only after my object is kept
>> in
>> the remote cache.
>> Does a Remote Cache send back the acknowledgment to the clients when the
>> Object is put into the cache ?
>> These are my Cache Config Files .. 
>> http://www.nabble.com/file/p22595967/remote.cache.server.ccf
>> remote.cache.server.ccf 
>> http://www.nabble.com/file/p22595967/remote.cache.client.ccf
>> remote.cache.client.ccf 
>> Thanks
>> Yaswanth

View this message in context: http://www.nabble.com/Does-Remote-Client-gets-acknowledgment-from-the-Remote-Cache-for-puts--tp22595967p22615001.html
Sent from the JCS - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org

View raw message