Idempotence
The property that performing an operation twice has the same effect as performing it once.
Idempotence is the property that repeating an operation changes nothing further. Setting a value is idempotent; incrementing one is not. Creating a record with a caller-supplied identifier can be; creating one with a generated identifier is not.
It is the single most useful property in any unreliable system, because it makes retry safe. Networks drop responses, jobs get rerun, users double-click, and schedulers overlap. If the operation is idempotent, none of that requires coordination — which is why an idempotency key is standard practice in payment and messaging interfaces.
It also makes automation tractable. A provisioning script that can be run repeatedly is one you can run without thinking; one that fails or duplicates on a second run has to be reasoned about every time. The same applies to scheduled jobs, migrations, and imports: designing so that a double run is harmless removes an entire class of operational anxiety. See Cron and Database Migration.
The corresponding design work is usually to make the operation express the desired end state rather than a delta — write the value rather than adjust it, upsert rather than insert, and derive rather than accumulate. Where a delta is unavoidable, a caller-supplied key and a record of keys already seen restores the property.
See also8
Hand-picked in the note itself — the neighbours worth reading next.
Race Condition
A defect whose occurrence depends on the relative timing of concurrent operations.
Testing & Verification11 connections
Cron
Time-based scheduling of recurring jobs, and the reasons scheduled jobs quietly stop working.
Systems & Tooling11 connections
Database Migration
A versioned, ordered change to a database schema, applied once and recorded.
Data & Content5 connections
Determinism
The property that identical inputs produce identical outputs, and the foundation of caching and verification.
Systems & Tooling27 connections
Relational Database
Data organised as tables with declared relationships, queried declaratively and guarded by constraints.
Data & Content8 connections
Seed Data
Initial content created programmatically to make an empty system usable or demonstrable.
Data & Content6 connections
Conflict-Free Replicated Data Type
A data structure whose replicas can be edited independently and always converge without coordination.
Networks & Distribution5 connections
Eventual Consistency
A guarantee that replicas converge given no further updates, without guaranteeing when.
Networks & Distribution7 connections
Related2
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from11
Notes elsewhere in the wiki that reach for this one.
- Conflict-Free Replicated Data TypeNetworks & Distribution
A data structure whose replicas can be edited independently and always converge without coordination.
- CronSystems & Tooling
Time-based scheduling of recurring jobs, and the reasons scheduled jobs quietly stop working.
- Database MigrationData & Content
A versioned, ordered change to a database schema, applied once and recorded.
- Eventual ConsistencyNetworks & Distribution
A guarantee that replicas converge given no further updates, without guaranteeing when.
- Peer-to-PeerNetworks & Distribution
An architecture where participants communicate directly rather than through a central server.
- Race ConditionTesting & Verification
A defect whose occurrence depends on the relative timing of concurrent operations.
- Relational DatabaseData & Content
Data organised as tables with declared relationships, queried declaratively and guarded by constraints.
- Seed DataData & Content
Initial content created programmatically to make an empty system usable or demonstrable.
- Signaling ServerNetworks & Distribution
The small coordination service peers use to find each other before connecting directly.
- Symbolic LinkSystems & Tooling
A file that points at another path, resolved transparently by most operations.
- WebRTCNetworks & Distribution
The browser standard for direct peer connections carrying audio, video, and arbitrary data.