I have a diagram structure of a directed graph, where I try to implement individual version control for each vertex. This creates some interesting scenarios, and I will be very grateful for any ideas that you have. In particular, I am looking to allow the default behavior of the system when it encounters the specified scenarios.
See the following image: Graphic versions
Scenario 1: The Null Pointer Paradox
Vertex A returns to version 1.0. Since this rollback will cascade down its subgraph, C will no longer point to D. This can create a danger. If the behavior should be:
- 1.1: Remove edge C → D, creating a broken graph
- 1.2: Remove D, leaving E orphaned
- 1.3: Delete D and E
- 1.4: Refuse to rollback before all edges pointing to D (which in this case will be E → D) are deleted.
- 1.X: Alternative solutions?
Scenario 2: Indirect Effects
Vertex D is updated, so the following is true:
- D is now version 1.2
- E is now version 1.1
- C is now version 1.3
- Now version 1.3
Vertex A is now rolled back to version 1.2, so the following is true:
- Now version 1.2
- C is now version 1.2
- D is now version 1.1
If the default behavior is:
- 2.1: Rollback E to 1.0
- 2.2: Refuse rollback due to danger of the version, which actually exacerbates the functionality
- 2.X: Alternative solutions?
version-control data-structures graph database-design graph-theory
Martin Källman
source share