1 Reply Latest reply on Nov 5, 2014 5:14 AM by rvansa

    Distributed Executor in Distributed Cluster

    muthukumaran.kothandaraman

      I am trying to get my head around how the target node(s) for execution of task is determined in distributed context. Key of a given cache would be spread across multiple nodes in distributed mode.

       

      So, if the task is designated against a set of keys which are not colocated, how the target node for running DistributedCallable is determined by Infinispan ? If any specific code is pointed to in source of 6.0.x, it would be useful.

       

      I want to understand the approach taken by pre-7.0.x releases as 7.0.x seems to radically different in many ways as I understand :-)

       

      Thanks in advance

       

      Cheers

      Muthu

        • 1. Re: Distributed Executor in Distributed Cluster
          rvansa

          Javadocs for DistributedExecutionService:

          Execution environment will chose an arbitrary node N hosting some or all of the keys specified as input. If all keys are not available locally at node N they will be retrieved from the cluster.

          If you want to check the implementation, just look into DefaultExecutionService. You'll find that it really grabs all nodes that own at least one of those keys, and then randomly picks one of them to execute the task.