7 Replies Latest reply on May 11, 2012 4:29 AM by Sudheer Krishna

    Can de decide the owner in distributed mode ?

    Sudheer Krishna Novice



      I have usecases where i want to use distributed mode with num_copies = 2 , but i want to get control of which node is the owner. This is because of those two nodes one node writes and the other node only reads.


      I want the node which writes to be the owner , and teh other one to be a replica.


      I have considered teh following options


      1. Key Affinity service +  server hinting


      This option becomes quite complex because we have our own keys generated by database, and it is mapped every where in the business tier. So it is almost impossible to change it.


      Another approach is to keep extra information  about key mapping betwen infinispan and database , which also seems to be complex considering various usecases.


      2. Groupinh API - aloows me to decide the group , but doesnt give me control which node has to become the owner


      3. If nothing works out , try replicated mode (at some overhead of extra locking)



      Are there any other options ?