This content has been marked as final.
Show 1 reply
-
1. Re: Hotrod Client support for atomic operations
moia Sep 12, 2013 10:07 AM (in response to infinifan)Jack,
I currently use optimistic locking mechanism to do this kind of operations - basically you get versioned data from the remote cache, increment it and use replace operation - this will fail if the value has changed since you read it, then you may repeat the operation. I use putIfAbsent, getVersioned and replaceWithVersion operations.
This works fine, when the elements are small and transport is fast. We are currently facing a problem, where we have large elements and want to increment single counters within them. I am looking for an alternative - for now the Distributed Execution Framework seems perfect for this, only I haven't found a way yet to access it via hot rod or other remote protocol.
Best regards,
Mikolaj