versioned value pattern
Every write attaches a version number; readers see the version they're entitled to. Readers and writers don't block each other. Foundation of MVCC, optimistic concurrency control, and conflict resolution in distributed stores.
Every write attaches a version number; readers see the version they're entitled to. Readers and writers don't block each other. Foundation of MVCC, optimistic concurrency control, and conflict resolution in distributed stores.
symptoms
- reader/writer blocking
- conflict resolution requires "what was here when I started?"
causes
- single-version storage
- no causality info on writes
fixes
- attach a monotonic version on every write
- readers see snapshot at their version
- optimistic CAS on version for conflict detection
you might say
- version vector
- lamport version
- CAS on version