Samarth M O’s Post

View profile for Samarth M O, graphic

Data Engineer 2 at Epsilon | ex-GE | AWS | Databricks | Spark

Building a Distributed Lock Management Service can be a very challenging problem! A Lock manager basically serves locks to multiple concurrent requests that are trying to get control (lock) over a shared resource. For example- multiple processes trying to update a certain central table but we want one and only one process to have complete control over the table at a given point in time. Relational databases do guarantee ACID transactions, however, if you have a huge number of concurrent requests hitting your application, this guarantee won’t be enough since databases stick to a certain Isolation level (Mostly Serializable) and requests can end up having dirty reads. What we really need here is not just Atomicity between requests but also a Pessimistic concurrency control. We essentially need our service to only talk to one request at a time and also do this very very fast! NoSQL databases like DynamoDB are more suited for these use cases because - 1) They can scale horizontally to virtually unlimited concurrent requests. 2) They provide features such as Transaction APIs and Conditional Updates that actually allow you to truly serve only one request at a time. This helps in building semaphores! 3) They have single milli-second response times. I’ll be writing a detailed article on this exact implementation soon! #dataengineering #systemdesign

To view or add a comment, sign in

Explore topics