Tensions in Practice: Merge freedom in tension with retaining arrival order¶
Event records · one observation point
Two event identifiers, A and B, reach a recorder. Whether A or B arrives first, a set of received identifiers ends as {A, B}. An ordered log instead retains [A, B] or [B, A]. Both can answer whether the two events occurred. Only the log can answer which this recorder received first. Reorder freedom depends on which observation the system promises to preserve.
Merge membership freely
Combine received identifiers without agreeing an order for the membership result.
Retain a sequence
Answer which event arrived first at the chosen recorder.
Why these aims pull against each other
Set union makes opposite arrival sequences equivalent by discarding order. Retaining order preserves that distinction and makes sequencing part of the record contract.
Choose an arrangement to see what changes and what remains difficult.
Finite illustrative comparisons. Text states carry the meaning; color is not a measured score or universal preference.
What this choice protects
What it costs
When it fits
Compare the arrangements
Membership set
Insert each identifier into a set and combine such sets by union.
| Stored view | Both occurred? | First event? | |
|---|---|---|---|
| A then B | {A, B} | Yes | Not retained |
| B then A | {A, B} | Yes | Not retained |
- What it protects
- A then B and B then A yield exactly the same membership result; merging membership needs no sequence tie-break.
- What it costs
- The first-arrival question cannot be recovered from this view.
- When it fits
- Consumers need occurrence membership and do not require sequence or multiplicity.
Illustration note: The finite setting and values are editorial assumptions, not measured effects or recommended operating settings. A and B denote received event records, not arbitrary state-changing commands claimed to commute.
Ordered log
Append identifiers to one ordered log as this recorder receives them.
| Stored view | Both occurred? | First event? | |
|---|---|---|---|
| A then B | [A, B] | Yes | A |
| B then A | [B, A] | Yes | B |
- What it protects
- The first-arrival question remains answerable and the two histories stay distinct.
- What it costs
- A sequence must be retained; merging independent logs would require an additional ordering contract rather than plain set union.
- When it fits
- Consumers need order at this specified observation point and can maintain that recording discipline.
Illustration note: The finite setting and values are editorial assumptions, not measured effects or recommended operating settings. Arrival order at this recorder is not necessarily causal order or a universal order across observers.
What this illustration does—and does not—establish
Commutativity: Commutativity observable versus hidden behind abstraction supplies the explicit log-set versus log-sequence contrast. The two histories isolate the observable being retained.
- Two unique identifiers are shown; duplicate-count semantics are deliberately outside the comparison.
- A set view can be derived from a retained log, but the reverse requires information the set discarded.
- No claim is made that the underlying real-world actions can safely be executed in either order.
Source entries
Commutativity
Commutativity: Commutativity observable versus hidden behind abstraction supplies the conflict examined here.
Commutativity observable versus hidden behind abstraction
An operation may appear commutative at one abstraction level and non-commutative at another (appending to a log: commutative in the sense that the log contains the same set of entries, non-commutative in that entry-order is preserved and externally visible).
Structural Tensions
This multi-level behavior can be productive (the commutative view supports reasoning about what has happened; the non-commutative view supports reasoning about sequence) but also confusing.