This content originally appeared on DEV Community and was authored by Doge Algo Engineering
Imagine, a file or database is written concurrently by 3 processes.
Eventhough from the user point of view where all the file write processeses happen at the same time, but that doesn't mean all three can co exist in the same file or database field right?
It will break consistency.
So, we need to make sure only the last written data as the final data for the file, in a given time.
How do we consider which data is the last data?
Timestamp of course!
Timestamp is used for each write operation to identify which write is the final write.
MongoDB and Cassandra are examples of having Last Write Wins Strategy.
More importantly in Cassandra if we are quering an update, each column has its own timestamp value.
Hope you guys find usefull
Support us by Buying us some Cookies
Visit our site Doge Algo
This content originally appeared on DEV Community and was authored by Doge Algo Engineering

Doge Algo Engineering | Sciencx (2022-04-24T17:16:59+00:00) Last Write Wins – A Conflict resolution strategy. Retrieved from https://www.scien.cx/2022/04/24/last-write-wins-a-conflict-resolution-strategy/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.