NhyFlow
Realm
U-line
Anchor
Version of 1
NLContent

Under the hood

NhyFlow stores everything in NHyDB – a database of its own that we developed for it. NhyFlow is the first application built on NHyDB. Here is what that means for your work and how fast it is.

A database with mathematical addresses

In NHyDB every value has a fixed address made of a few coordinates: an area (realm), two coordinates u and v and one of two sides, NL or NR. Every address has a natural number that is computed from it – never assigned and stored nowhere. More on nhydb.de.

The mathematics behind the fixed addresses is no accident: it comes from an independent research series on the structure of the natural numbers. If you want to dig deeper, you will find the papers in the research notebook wikiforschung.de (in German).

How your work lives in NHyDB

In NhyFlow In NHyDB
Realm realm R
U-line (a project, a book, a series of measurements) u
Anchor k, version n v = k · 10⁸ + (n − 1)
Text and the note beside it side NL and NR

So anchor 3 in version 2 lives at v = 300,000,001 – the text on NL, your note on NR of the same address.

What you notice

  • Addresses never change. Reorder chapters, rename them, restructure – the address of a place stays the same.
  • Nothing is overwritten. NHyDB only appends changes. A new version is a new address; earlier drafts stay readable.
  • A crash does not cost a saved state. After a crash the last saved state applies; half-written data is discarded.
  • It is fast – even with large collections, see below.

Native in Rust

The core of NHyDB is a pure Rust library. NhyFlow builds it in directly: no database server in the background, no detour through another language. Your database is a file on your computer or your own server.

How fast?

A hard test with real files: 6 Markdown files, one U-line each in one realm, 4,275 anchors and 8.73 MiB in total – around 9 million characters and 1.2 million words, roughly a dozen novels. A snapshot with all anchors in a random order – criss-cross through all six U-lines – is exported as one file. 200 times, each time with a new random order, and every result is checked byte for byte.

Median 95 % of runs below slowest run
Export until the file is closed 6.35 ms 6.43 ms 6.51 ms
the same, safely on the SSD (fsync) 14.46 ms 16.00 ms 18.05 ms

All 200 exports were correct to the byte. The exact conditions and further values – import, snapshots, full-text search – are on the right.

1.2 million words, reassembled from 4,275 sections, in just over 6 milliseconds.

How NHyDB itself performs with ten million records is shown by the benchmarks on nhydb.de.