DEV Community

Discussion on: Making The Invalid Impossible - Choosing The Right Data Model

Collapse
maphengg profile image
maphengg

Locking is fine in a single instance of an application but doesn't help in a distributed system where availability is the priority over consistency of data.

Thread Thread
frosnerd profile image
Frank Rosner Author

I agree. You have to understand whether you want availability or consistency if there is a network partition. Based on your requirements you should select the coordination algorithm that fits your needs.