Skip to content

DataGraph

A verifiable graph database built on signed registries.

Alpha

DataGraph is alpha software. APIs, file formats and defaults can change between releases. Test it thoroughly before relying on it, and keep the source files of every graph you publish.

DataGraph turns a registry into a queryable property graph. You describe nodes and edges in plain JSON Lines files, publish them to a registry with your own key, and any number of graphd services load, verify and serve them. No service owns the graph: the signed registry is the source of truth, and every service that loads the same registry state computes the same root hash.

What you can do

  • Publish a graph with a key, not an account. Every node and edge comes from a file that the author signed, versioned and can withdraw.
  • Query it with pattern matching, variable-length paths, filters, ordering and aggregation.
  • Run graph algorithms: shortest path, traversal, PageRank and personalized rank, connected components, common neighbors and suggestions.
  • Combine graphs from different authors in one query, with a precedence you choose.
  • Verify every answer. Responses are signed, name the exact registry version they were computed from, and any statement can be proven against the graph root.
  • Audit a service. graphctl audit rebuilds the graph from the registry on your own machine and compares the root.

How it fits together

 author                     registry network                      DataGraph
┌──────────────┐   signed   ┌──────────────────┐  quorum read   ┌──────────────────┐
│ segment files│──events───▶│ relays, indexers │───────────────▶│ graphd           │
│ registryctl  │            │ watchdog         │                │  verify segments │
└──────┬───────┘            └──────────────────┘                │  build graph     │
       │ bytes              ┌──────────────────┐  fetch by hash │  compute root    │
       └───────────────────▶│ origin           │───────────────▶│  signed queries  │
                            └──────────────────┘                └────────┬─────────┘
                                                                         │
                                                              graphctl, HTTP clients

Where to go next

You want to Read
Run it end to end in a few minutes Getting Started
Understand graphs, segments, roots and provenance Concepts
Write and publish data Writing Segments, Publishing and Updating
Ask questions Querying, Query Language
Check that an answer is right Verifying Answers
Run it as a service Configuration, Operations

Source

The implementation is in src/data-graph. It uses the registry reader in src/support/registries and the relay client in src/relay/go, and does not change either.