Database Locks
Table of contents
Database Locks
Table of Contents
Managing locks from client side code on Amazon DDB
- Read the blog at Building Distributed Locks with the DynamoDB Lock Client.
- The same logic can be used not just in DDB, but in any database.
- The idea here is you maintain another table that specifies which key, lease duration, host owner. lease start time etc of the lock. Each client, when updating any row will acquire the lock first, perform operations, then either heart beat if required or release the lock. Other clients should respect the same lock mechanism.