liveBook · Manning

Conflicting mutation

As explained in Data-Oriented Programming: Reduce software complexity

A mutation whose structural changes overlap with those of another mutation at one or more information paths.

A conflicting mutation changes information paths that overlap with another mutation. Compare the structural diffs from a shared previous state: a common path signals that the mutations cannot be safely combined without resolving the overlap. section 5.4

The library catalog test

One mutation changes Watchmen’s publication year; another changes its title and Dave Gibbons’s name. Their paths are publicationYear, title, and author name, so they are nonconflicting. If two mutations report the same information path, they are conflicting.

How Data-Oriented Programming: Reduce software complexity covers it

How deep it goes
Defines conflicts through structural diffs and path intersection, but stops short of resolving conflicting values.
Examples
Uses a library catalog where mutations update a book’s publication year, title, and author name.
What it assumes
Assumes nested maps and immutable updates while demonstrating structural diffs and information paths through examples.
What you can do after
Diagnose mutation conflicts by computing structural diffs, extracting paths, and checking their intersection.
How it connects
Connects immutable data, structural sharing, structural diff, information paths, and concurrent mutations.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data-Oriented Programming: Reduce software complexity. The section links point to the parts of the book it draws on.