2 Replies Latest reply on Apr 24, 2014 2:45 PM by qkhan

    Large data volume with data consistency and data locking

    qkhan

      I am investigating a scenario as follows

       

      A relational object graph(a big volume of data) to be uploaded on a daily basis which is further populated based on a event/trigger

       

      Due to the size of data and need for co location of data within application logic, JDG 6.2 Library mode has been selected. And for the same reason distributed mode is also selected as due to the size of the data replication mode seems to have degraded performance. The prime objectives are to ensure:

       

      1) The consistency of data and

      2) When any object in the graph is being modified, the entire data structure needs to be “locked” for both reads and writes on all nodes

       

      I am looking for any advice/best practices on how to ensure these two objectives.

       

       

      Also, I am interested in knowing best ways to populate the large object model.

       

      Is there any quickstart or sample which I can use which demonstrate the above?

       

      Regards 

        • 1. Re: Large data volume with data consistency and data locking
          rvansa

          The need for locking the whole structure kind of limits scalability, doesn't it?

           

          With transactional mode, if you use FORCE_WRITE_LOCK for all read operations, any update to the data structure will appear as atomic. However, this does not guarantee that two concurrent modifications wouldn't occur in parallel.

           

          You can always involve one special key as the lock, but you're trying to design non-scalable system. Infinispan is meant to be used as highly scalable systems, therefore, it has no special support for a "big lock".

          1 of 1 people found this helpful
          • 2. Re: Large data volume with data consistency and data locking
            qkhan

            Thanks Radim for the response. Let say we have the following scenarios

             

            1. If someone selects to update the data as soon as the user acquires the lock, entire data structure is locked and nobody can update the data unless the lock is released, though they can continue to read the data

             

            2, If someone selects to update the data as soon as the user acquires the lock, only 'that' data structure is locked and nobody can update that specific data unless the lock is released, again they can continue to read the data

             

            One related question would be if it is possible to selectively lock a portion of data based on say a primary key of that data?