This content has been marked as final. Show 1 reply
Take a look at CacheStores - ideally BinaryCacheStore. You can configure the CacheStore to be invoked asynchronously by setting the write-delay to a non-zero value in the cache config e.g. to 1ms.
What you do in your CacheStore impl is up to you, so you can take you existing EntryProcessor and invoke it from your cache store without issue (just make sure you have enough worker threads on your source service to handle your load.
The benefit of using CacheStores is that the thread doing the call back is a Coherence worker thread. Calls to cache stores come with a guarentee that if the node fails before the CacheStore has been invoked or returned then the CacheStore will be invoked for you on the backup node once the partition has been promoted to a primary - i.e. it offers the fault tolerance you're looking for.
We use this pattern in Production and it works very well.
The main caveat with this approach is that multiple updates to a single entry within the write-delay are lost i.e. you only get a single call to your CacheStore with the latest value - intermediate values are lost. If this is acceptable to you, as it is to us, then this pattern works well.
Hope this helps,