I have the below code which works absolutely great. I can get 11,000 full
business requests with 2ms latency (including network).
Wondering if I should replace compute.affinityCall() with cache.invoke()?
Inside the EntryProcessor if the key does not exist yet. Can we do a
Does cache.invoke also collocate with the key?
Cache.invoke(...) operates within a lock on a key, atomically, while "affinityCall(...)" is not atomic - it sends a computation to a node and can operate on multiple keys or start multiple transactions from the computation.
In your case, it seems that all you are doing is updating 1 key, so Cache.invoke(...) may be an option for you.