4 ms·
" Updating a stored trip happens like: set(“trip1, version2”, “yyu”); delete(“trip1, version1”). The advantage is if there’s a failure between the set and delet
by manibatra 11y ago
" Updating a stored trip happens like: set(“trip1, version2”, “yyu”); delete(“trip1, version1”). The advantage is if there’s a failure between the set and delete there will be two values stored instead of nothing stored."
So simple yet could be overlooked. Great read overall.
- fche 11y agoSee also Postgres multi-version concurrency control. Doesn't solve the problem of merging incompatible inatomic-concurrent changes.
- manibatra 11y agothanks will surely have a look.
- stingraycharles 11y agoThis is Copy-On-Write in disguise: the different versions can actually be considered different objects, in which case it's just a copy and an eventual cleanup of the old object.
- manibatra 11y agoRight. Just read what Copy-On-Write is. Follows the same basic principle. I might be wrong, but Copy-On-Write is formally referred to the case of a shared resource? Though I think we could consider the trip information to be shared between the phone and the data centre.