1 of 1 people found this helpful
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".
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?