Written in Go · Single Binary · Zero Dependencies

The Graph Database
Built for Speed

High-performance embeddable graph database with Cypher queries, ACID transactions, Raft replication, and 50 GB+ scale — all in a single dependency-free binary.

$go get github.com/mstrYoda/goraphdb
< 1ms
Indexed Lookups
50 GB+
Dataset Scale
100K
Nodes in 120ms
0
Dependencies

Features

Everything You Need to Build with Graphs

From sub-millisecond lookups to distributed replication — GoraphDB packs enterprise-grade features into a single Go binary.

Blazing Fast Queries

Sub-millisecond indexed lookups with B+tree secondary indexes, composite indexes, and LIMIT push-down optimization.

Cypher Query Language

Full read/write Cypher support with MATCH, CREATE, MERGE, SET, DELETE, OPTIONAL MATCH, parameterized queries, and EXPLAIN/PROFILE.

ACID Transactions

Begin/Commit/Rollback API for multi-statement atomic operations with read-your-writes semantics and CRC32 data integrity.

Raft Replication

Single-leader replication with automatic failover via Raft consensus. WAL-based log shipping over gRPC with transparent write forwarding.

Graph Algorithms

Built-in BFS, DFS, Shortest Path (Dijkstra), All Paths, Connected Components, and Topological Sort with concurrent execution.

Hash-Based Sharding

Transparent hash-based partitioning across multiple bbolt files. Edges co-located with source nodes for single-shard traversals.

Prometheus Metrics

Built-in atomic counters with Prometheus text exposition. Track queries, cache hits, node/edge CRUD, index lookups, and live gauges.

Streaming Results

CypherStream() returns a lazy RowIterator for O(1) memory. NDJSON streaming via POST /api/cypher/stream for large result sets.

Unique Constraints

Enforce value uniqueness across labeled nodes with O(1) lookup. WAL-replicated, enforced on all write paths including Cypher MERGE.

50 GB+ Scale

bbolt memory-mapped storage with configurable MmapSize. Byte-budgeted sharded LRU cache (128 MB default) for predictable memory.

Concurrent Reads

Fully parallel BFS, DFS, Cypher, and query-builder calls via MVCC snapshot isolation. Built-in goroutine worker pool.

Query Governor

MaxResultRows cap, DefaultQueryTimeout, slow query log, prepared statement cache (10K entries), and panic recovery on all entry points.

Interactive Demo

See Your Data Come Alive

Explore graph data with Cypher queries. Click nodes to navigate, run queries to see relationships unfold.

Cypher Query
MATCH (a {name: "Alice"})-[:FOLLOWS]->(b)
RETURN b.name
Result (2 rows) · < 1ms
Bob, Charlie
Person
Movie
Character
Server
Queue/DB

Performance

Engineered for Raw Speed

Benchmarked on Apple M-series. Sub-millisecond indexed lookups, batch inserts in 120ms, and a query cache that makes repeated queries near-instant.

<0ms
Indexed Lookup
B+tree property seek
0GB+
Dataset Scale
Memory-mapped storage
0ms
100K Node Insert
Batch with single fsync
0
Worker Threads
Concurrent query pool

Benchmark Results

Apple M-series · go test -bench
AddNodeBatch (100K nodes)
~120 ms
CreateIndex (100K nodes)
~180 ms
FindByProperty (indexed)
< 1 ms
Cypher filter (indexed, 100K)
< 1 ms
Cypher 1-hop traversal
< 1 ms
ORDER BY + LIMIT 10 (100K)
~60 ms
1000× repeated Cypher (cached)
~200 ms

Architecture

Clean Layers, Zero Bloat

From the UI layer down to the storage engine — every layer is designed for performance and simplicity.

Management UI

React + TypeScript + Tailwind · cytoscape.js · CodeMirror

Query EditorDashboardIndexesExplorer

HTTP / JSON API

/api/cypher · /api/nodes · /api/edges · /api/indexes · /api/health

REST APIStreamingPrepared StmtsMetrics

Replication Layer

WAL · gRPC Log Shipping · Applier · Raft Election

WALgRPC StreamRaftWrite Forward

Cypher Engine

Lexer → Parser → AST → Executor (index-aware)

EXPLAIN/PROFILEOPTIONAL MATCHParamsCache

Storage Layer

bbolt (B+tree) · Memory-mapped · MVCC · MessagePack

B+treeCRC32Bloom FilterSharding
nodesedgesadj_outadj_inidx_propidx_edgelabelsidx_lblidx_unique

Get Started

Simple API, Powerful Results

Go from zero to graph queries in minutes. A clean, fluent API that feels native to Go.

package main

import (
    "fmt"
    "context"
    graphdb "github.com/mstrYoda/goraphdb"
)

func main() {
    db, _ := graphdb.Open("./my.db", graphdb.DefaultOptions())
    defer db.Close()

    alice, _ := db.AddNode(graphdb.Props{"name": "Alice", "age": 30})
    bob, _ := db.AddNode(graphdb.Props{"name": "Bob", "age": 25})

    db.AddEdge(alice, bob, "follows", graphdb.Props{"since": "2024"})

    ctx := context.Background()
    res, _ := db.Cypher(ctx, `MATCH (a {name: "Alice"})-[:follows]->(b)
                              RETURN b.name`)
    for _, row := range res.Rows {
        fmt.Println(row["b.name"]) // Bob
    }
}

Ready to Build with Graphs?

Get started in under 5 minutes. One Go module, zero external dependencies, instant graph power.

$go get github.com/mstrYoda/goraphdb