4 Replies Latest reply: Dec 11, 2012 9:06 AM by user639604 RSS

    "Node affinity" or inserting data in a given node only

    ggarciao.com
      I'm using coherence as a "Integration Channel" for a few legacy applications sharing a coherence cluster between them.

      Due to this, some operations of the cluster can be only executed in a particular node. Here is the my current case as example: Every entry cache should be indexed with lucene but due to some limitations, I can only run the indexation in the node X (I'm using a file-system storage for lucene and I do not have a distributed/shared file system). So, no matter where the entry is inserted, I need to trigger an indexation in the node X. So, what I need is something like an entry processor that will be always executed in the selected node x.

      So, my questions are:

      * There is a notion of "node affinity" for remote executions? Something like a entry processor that can check the node where actually is, and if it is the correct node, execute the indexation code.
      * There is a way to add a cache entry to a particular node? If I manage to do this, what I need to do is to use a cache with a entry in the node that I need. Then an entry processor will execute the indexation code in when it find the correct cache entry. Something like the Key affinity Service of Infinispan https://docs.jboss.org/author/display/ISPN/Key+affinity+service

      Edited by: ggarciao.com on Dec 5, 2012 9:08 AM

      Edited by: ggarciao.com on Dec 5, 2012 9:09 AM

      Edited by: ggarciao.com on Dec 5, 2012 9:10 AM