Skip to content

Foray 382 · Essai 01

Which architecture elements did the picture leave out?

Imagine reviewing an insurer’s architecture. The register contains a function called Policy Creation, but the picture of the architecture contains no such function. Did the import lose it, or did the drawing leave it out?

Lawrence asked Neo4j which elements had no links in November 2022. He then used Graphistry to draw the graph from a query that returned pairs of connected elements. Those two operations answer different questions. The public ArchiSurance example has 121 elements and 176 relationships. Its edges touch 103 distinct elements. Asking the drawing to infer its nodes from the edges leaves all 18 isolated elements out.

Compare the three application elements with no incoming link

103 of 121 elements appear. Two of the three application elements below have outgoing links, so both appear even though nothing points to them.

121 of 121 elements appear. Providing a separate node table restores Policy Creation and the other 17 isolated elements.

  • Claim Data Management

    Accesses Damage Claim Data.

  • Calculate Risk

    Accesses Insurance Request Data and triggers Calculate Premium.

  • Policy Creation

    Has no recorded relationship in either direction.

The other isolates include Front Office, Travel Insurance Policy, every recorded principle and two distinct devices both named Unix Server. The IDs keep those two devices separate. An empty neighbourhood is a question for the architect about model coverage. It tells us nothing by itself about whether anyone uses the system.

Find the three applications in Neo4j

Once this experiment is loaded, paste this query into Aura Query. It checks incoming edges in the scope of this replay, even when other experiments share the database. It should return Calculate Risk, Claim Data Management and Policy Creation.

MATCH (n:F382ArchiElement)
WHERE n.class IN ['ApplicationComponent', 'ApplicationService',
                  'ApplicationFunction']
  AND NOT EXISTS {
    MATCH (:F382ArchiElement)-[r]->(n)
    WHERE r.experiment = '382.archisurance'
  }
RETURN n.name AS application
ORDER BY application
Find all 18 isolated elements
MATCH (n:F382ArchiElement)
WHERE NOT EXISTS {
  MATCH (n)-[r]-(:F382ArchiElement)
  WHERE r.experiment = '382.archisurance'
}
RETURN n.id AS element_id, n.name AS element, n.class AS kind
ORDER BY element, element_id

Reopen the Graphistry experiment

Download the maintained Graphistry notebook and its companion loader into one directory. The notebook runs from the original CSVs or from the same graph in Neo4j. It builds both PyGraphistry views, lists the missing elements, and lets you explicitly upload a chosen view to your own Graphistry account with private sharing. Running the default cells builds the tables locally.

Run the notebook or rebuild a database

For the notebook, use Python 3.12 with Jupyter and install graphistry==0.62.1 neo4j==6.4.1 pandas. Run the cells with hosted upload off to compare the two views. The final cell explains how to render privately if desired. Supply credentials through the environment.

For a source-only check, run python archisurance.py. For a connected replay, install neo4j==6.4.1 and set NEO4J_URI, NEO4J_USERNAME and NEO4J_PASSWORD for the intended database. The URI for an Aura connection begins with neo4j+s://. The optional NEO4J_DATABASE selects the database name, defaulting to neo4j.

python archisurance.py --load
python archisurance.py --check

The loader checks the three original files by checksum. It merges 121 elements by stable ID and 176 typed relationships by ID and endpoints. It preserves 32 relationship names and 41 extra relationship properties. --check reads every stored row back and compares it with the source. You can also pass --source-dir with a folder holding the three unchanged CSVs. In the notebook the corresponding option is ARCHI_SOURCE_DIR.

What was tested

On 21 November 2026 the first load and verification took 4.07 seconds on a local Neo4j Community 5.26.0 instance with the files already available. A second load took 0.82 seconds and produced the same counts and properties. A fresh read-only check took 0.33 seconds. These timings cover the database commands and Python startup. Provisioning, installing packages, downloading the files and a human finding the query are outside that clock.

All analysis cells in the new notebook ran on the pinned files and again through Neo4j. PyGraphistry 0.62.1 received 103 nodes for the endpoint view and 121 for the full view, with 176 edges in each. The optional hosted Graphistry rendering needs your account and was not part of this test.

Where the records came from

The element, relationship and property tables are the ArchiSurance example in Lju Lazarevic’s original repository, pinned source revision. Lawrence’s contribution in November 2022 was an import and exploration recipe followed by the Neo4j-to-Graphistry view. The maintained notebook and loader use the upstream records directly. PyGraphistry documentation and source.

Return to the graph workshop →