Sophisticated WoT will require queries with many traversals, and IFA (index free adjacency, the defining characteristic of *native* graph dbs) helps with multi-traversal queries.
LMDB does not inherently boast IFA. But is it possible to build it in? Can we marry the lightning speed of LMDB with the advantages of IFA? Yes.
It turns out there are at least two native graph databases built on LMDB: HelixDB and LemonGraph.
HelixDB is new (2025) but supported by y-Combinator and boasts some good benchmarks.
LemonGraph appears abandoned, no commits in 3 years.
https://github.com/NationalSecurityAgency/lemongraph
So would HelixDB be a better choice than neo4j for the Brainstorm rebuild? Maybe, maybe not. Two disadvantages of LMDB: first, LMDB is single-writer by design and cannot be made multi-writer without destroying what makes it awesome. If we want Brainstorm to stream large amounts of data, single-writer is fundamentally bad. Second: LMDB requires manual resizing. This might not actually be too much of a problem for Brainstorm, provided the size of the graph remains sufficiently predictable, which it probably will. (A sudden influx of a million nostr users would be a āchampagne problemā š)
The case for using HelixDB instead of neo4j for the core Brainstorm engine: 1. Reads should be faster, and weāll be doing a lot of reads. 2. We bite the bullet and accept that weāll be writing batched data, not streaming, which is probably fine if batches arenāt too far apart. 3. The db size will be relatively predictable, since weāre not ingesting every event, just managing users and their follow/mute/report interrelationships; therefore the LMDB manual resizing problem isnāt an issue.
The case against HelixDB: itās young and there is LOTS of open source tooling built on neo4j that does not (yet?) exist on HelixDB. Cypher, for instance. And will it be abandoned in a few years? Who knows?
So Iām not completely sold on HelixDB (LMDB with IFA) over neo4j, but it is a contender.
nostr:npub10mtatsat7ph6rsq0w8u8npt8d86x4jfr2nqjnvld2439q6f8ugqq0x27hf - thoughts?