adddelete
Adddelete is a term used in some data synchronization and change-tracking contexts to describe a change set that explicitly contains both additions and deletions. In this model, a change is not represented as a single patch or delta, but as two parallel lists: items to be added and items to be deleted. Each added item generally carries a unique key and a payload, while each deleted item is identified by its key.
- Additions: a collection of new items with keys and associated data.
- Deletions: a collection of keys corresponding to items to be removed.
Change sets can be serialized as two separate lists, or as a single sequence of tagged records
Adddelete is used in distributed systems, order-preserving replication, and event-sourced architectures where maintaining a clear history
- Clear semantics for both insertions and removals
- Facilitates auditing, idempotence, and conflict resolution
- Can simplify streaming of changes in replication scenarios
- Correct application may require ordering constraints to maintain consistency
- Potential redundancy if same keys are added and deleted in quick succession
- Semantics can vary by implementation, leading to interoperability considerations
See also delta encoding, patch, diff, change data capture, and event sourcing.