2

We are currently using Infinispan for caching data from database which is working fine. Since we are already using Infinspan, I was wondering if it can be used for communication and coordination between application server instances that are running the same application.

An example would be a counter where each app server counts the task it completes. Each server gets a cached object and updates the counter every time it completes a task.

I am still learning Inifinspan and still figuring out the details but I wanted to know if anyone has used it in such a way and if there has been challenges and drawbacks you have seen when used in such a way.

Thanks

user624558
  • 559
  • 2
  • 8
  • 20

1 Answers1

0

That absolutely depends on you use case. How many "task updates" do you expect? A few per minute?

You can put an object with one key into the distributed cache/store and update its value on all nodes. But this requires locking on each update and Infinispan doesn't perfrom really good on such write-heavy use cases.

If you are interested in real cluster communication, have a look on JGroups (on which Infinispan is based as well). But there are are other good frameworks for cluster communication out there. For example Hazelcast. Like I said: it all depends on your use case.

Regards,

Jan

roehrijn
  • 1,387
  • 1
  • 11
  • 20