Skip to content

QuantyDB 0.4.0 — the first one you can install

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Sep 02:26
· 10 commits to main since this release

QuantyDB 0.4.0 is the first release you can install.

Until now there was a repository and a cargo build. Now there are
binaries for six platforms, signed apt and dnf repositories, a Homebrew
formula, an AUR package, a one-line installer and a way to update. The
status word moves from pre-alpha to alpha for that reason and no other:
nothing got safer overnight, but there is finally something to install.

Install

curl -fsSL https://quantyroot.github.io/QuantyDatabase/install.sh | sh

Debian, Ubuntu, Raspberry Pi OS:

curl -fsSL https://quantyroot.github.io/QuantyDatabase/gpg.key \
  | sudo gpg --dearmor -o /usr/share/keyrings/quantydb.gpg
echo "deb [signed-by=/usr/share/keyrings/quantydb.gpg] \
  https://quantyroot.github.io/QuantyDatabase/apt stable main" \
  | sudo tee /etc/apt/sources.list.d/quantydb.list
sudo apt update && sudo apt install quantydb

Fedora, RHEL, openSUSE:

sudo curl -fsSL https://quantyroot.github.io/QuantyDatabase/quantydb.repo \
  -o /etc/yum.repos.d/quantydb.repo
sudo dnf install quantydb

macOS and Linux with Homebrew:

brew tap quantyroot/quantydb https://github.com/QuantyRoot/QuantyDatabase
brew install quantydb

Arch: yay -S quantydb-bin. From source: cargo install quantydb-cli,
which needs Rust 1.89 and nothing else.

x86_64 and arm64 on Linux, both architectures on macOS, x86_64 on
Windows. Each binary is built and tested on the machine it is for; none
of them is cross compiled.

What is new

The server closes when you ask it to. It had a shutdown flag that
nothing ever set, so every stop was a crash. Recoverable, exercised by a
few thousand kills on every push, and not the same as closing:
connections were dropped mid-answer and the file lock was taken back by
the kernel rather than given up. SIGINT, SIGTERM and SIGHUP now set that
flag, and the test asserts the part that would rot quietly, which is that
the database opens afterwards.

quantydb setup writes a database, a private token file and
optionally a systemd unit that runs as a person rather than as root. It
starts nothing and overwrites nothing. quantydb uninstall takes the
service and the binary away and never the database or the token file, and
only removes a unit that runs the binary you are asking, so a copy in a
downloads folder cannot take out the one you installed.

quantydb update --file installs a binary you already have, keeping
the old one beside it. It refuses a file shorter than its own headers
describe, which is what half a download looks like. Fetching a release
over the network needs TLS, which is written here rather than pulled in
and is not written yet.

A kqueue backend for the reactor, so its tests run on macOS rather
than only compiling there.

Search, blobs and index suggestions from the phases before this one:
a suggestion measured 167x against the scan it replaces.

What this does not do yet

The wire is not encrypted. Tokens cross it in the clear on every
connection, so anyone who can watch the traffic can take one and use it
again. TLS is a phase of its own. Keep quantydb serve on loopback or
behind wireguard, an ssh tunnel or a TLS proxy. The server says so every
time it starts, and louder when the address is not a loopback one.

quantydb serve is Linux only. The reactor has a kqueue backend and
its tests pass on macOS, but no kernel except Linux spreads accepted
connections across workers: two hundred connections went 0/0/0/200 across
reuseport listeners on Darwin and 0/0/22/178 across workers sharing one,
against 39/48/54/59 on Linux. A macOS server would run on one worker
whichever shape it picked. The tool, the library and both query languages
run everywhere.

The formats will still change before 1.0. Old formats are not
migrated. This is alpha, and it says so on the tin.

By the numbers

Dependencies 0, and the lock file is checked on every push
Tests 580 functions, 14 jobs, 3 operating systems
Fuzzing per push 4 fuzzers, 10 minutes each
Crash testing per push 2300 kill -9s, every file recovered
Soak 1.8 million statements in 30 minutes, 0 failed
Idle connections 10000 held, under 1 kB of memory each

Full changes in CHANGELOG.md. Why anything is the way it
is, with what it cost, in DECISIONS.md.