Importance of distributed locking

Locking is one of the most important synchronization techniques in a database. It is a must if multiple users are interacting with it simultaneously. The use of a high-level API (along with a version attribute in the mapping class) ensures locking. In the case of a multiuser, multiserver database environment, if distributed locking is not incorporated then most of the users may well be sitting on the detached branch of the tree and working on obsolete data. The importance is actually in deciding whether we need this locking, because as a tradeoff every item will have an attribute especially to manage versions or locking, which might itself eat up a lot of space and throughput capacity.

Get DynamoDB Applied Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.