Question

We want to use Infinispan as a compute grid. We found the documentation on the Distributed Execution Framework in Infinispan 5.0.

What we want to do is to dedicate some nodes of the cache as dedicated nodes for executing particular tasks, since only these nodes have the necessary hardware.

My idea was to create a distributed cache mapping HardwareDriverKey to HardwareDriver, and execute the task using DistributedExecutorService.submit(task, hardwareDriverKey). For this to work, we need to figure out a way to ensure that the hardwareDriverKey is always located on the particular node of the distributed cache containing the actual hardware.

Do we need to write a custom ConsistentHash that can extract the node address from the hardwareDriverKey? Have you got an example for this? Or is there another way?

Thanks in advance, Geert.

Was it helpful?

Solution

That basically forces the groups of objects to stay on the same node, but you can't control which node it is. In order to force location to a specific address you can use the KeyAffinityService. Be aware though that objects might be moved around if the topology changes.

OTHER TIPS

The grouping API is there to solve this problem. You can read more about it here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top