Skip to content

[Feature] Extend Diff-and-Patch Support to NetworkX & Introduce Provider-Agnostic Versioning #4

Description

@seb-esser

Background

ConMan2 currently implements a diff-and-patch strategy exclusively for Neo4j-backed graphs. With the recent experimental addition of NetworkX as a graph provider, the versioning pipeline needs to be extended to support NetworkX natively — while laying the groundwork for a provider-agnostic architecture where increments computed on one backend can be applied to another.

Tasks

  • Audit the existing Neo4j diff-and-patch implementation: Review the current diffing logic, increment format, and patch application flow to establish a baseline before extending to NetworkX. Relevant entry point: IfcGraphInterface and the graph_provider parameter.
  • Propagate graph_provider awareness through the versioning pipeline: Refine the codebase so that the selected graph provider (Neo4j or NetworkX) is respected consistently across all diff, commit, and patch operations rather than defaulting silently to Neo4j behavior.
  • Implement version increment calculation for NetworkX graphs: Port or adapt the diff logic to operate on NetworkX graph structures. This includes detecting topological changes (node/edge additions, deletions) and attribute-level alterations.
  • Persist NetworkX increments in a unified format: Store computed NetworkX increments using the same serialization schema as Neo4j increments, ensuring interoperability of the version history regardless of which backend produced it.
  • Extend the increment loader to support patching on both backends: Update the patch/apply mechanism so that a stored increment — regardless of its origin — can be loaded and applied to either a Neo4j or a NetworkX graph.

Long-Term Vision

The graph providers should become fully interchangeable. A user should be able to:

  • Compute a diff locally using NetworkX (no database connection required)
  • Transmit the resulting increment to a Neo4j collaboration hub for sharing (and vice versa)

This decoupling of diff computation from persistence backend is a key step toward a more flexible, offline-capable versioning workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions