LEYLINE

Introduction

What Leyline is, and the one decision everything else follows from.

Leyline is a distributed graph database. It keeps the graph as immutable compressed-sparse-row segments in S3 and runs traversal on stateless compute, so a query reads the neighbourhoods it walks and nothing else.

That single decision is where the rest of the design comes from.

Storage

Every vertex's neighbours sit contiguously in one array. offsets[v] and offsets[v+1] bracket the slice, so expanding a vertex is one read at a known length rather than a walk through the structure to find the structure.

Segments are sealed when they are written. Nothing mutates them afterwards, which means any reader can cache one forever, no reader takes a lock, and no reader ever sees a torn view.

Query

A subset of Cypher: MATCH, variable-length paths, WHERE, aggregation, and shortestPath. The planner's unit of work is a segment fetch rather than a table scan, and it names the segments it intends to touch before it touches them.

Cost

Graph databases usually price the graph — resident memory for all of it, whether or not you query it. Leyline prices the traversal. A graph you do not walk this month costs object storage and nothing else.

Scaffolding

These pages are a placeholder proving the docs pipeline builds and deploys. Real reference documentation is still to be written.

On this page