Skip to content

v0.1.10

Choose a tag to compare

@github-actions github-actions released this 04 Oct 14:48
· 2689 commits to main since this release
98177cd

Highlights

A file compacts itself. Every update appends the whole record and the version it replaced stays dead until a compact, which nothing ran on its own: under YCSB a 1 GB table grew to 4.7–6.5 GB and reads waited on the disk. Now the engine counts its dead bytes and compacts beside the database once half the file is dead (and at least 64 MB): on the server and every tenant (--auto-compact, on by default), in the native library for apps, and for embedded Rust (Compactor). A put costs what it did (570 ns). The online compact itself got shorter pauses: the write lock is held about 10 ms at the swap, where it held readers 409–811 ms on a 1 GB file.

Writes that read the row, and writes that only land when they may — what an app used Redis for.

  • set hits {n: n + 1, at: now()} where key = $1 — atomic under the single writer; 16 clients × 10 000 increments end at exactly 160 000. Builders: inc(1), expr('price * ?', 1.2) in JS, Python, Go, .NET, Swift, Kotlin and Dart, all rendering the same text.
  • insert … if absent answers 1 or 0, so a lock is one statement; with @ttl it expires, and an expired row no longer blocks a write.
  • affected is exact on every path, so where version = 3 is a compare-and-set.
  • An offline increment on a synced replica is evaluated again on the server: two devices' +1 land as +2.
  • New docs page, Instead of Redis: counter, rate limit, lock, optimistic concurrency, sessions, leaderboard, change notification — each with its measured cost, each run in CI — and what it does not replace.

Measured against SQLite, PostgreSQL and MongoDB (YCSB). A YCSB harness (make ycsb) with every answer verified (13.8 M reads, 135 M scanned rows, 0 mismatches) and calibrated against Yahoo's YCSB 0.17.0 (within −14% to +2%). Embedded, fenecdb leads SQLite in every cell (C at one thread 438k ops/s against 279k); over HTTP in Docker it leads PostgreSQL and MongoDB at 16 clients and trails PostgreSQL by 4–10% with one client. Every cell, the raw results and the method are on the benchmarks page.

Search results you can show. highlight(body) and snippet(body, N) mark what a match matched; facet f [top N] counts values beside the rows.

Packages. @fenecdb/web ships one module, fenec.wasm, beside @fenecdb/web/client for apps whose queries run on a server. The opt-in replica module of 0.1.9 is gone (no graph, no schema check, near 2–40× slower), and the module without indexes is a CI test build, not a shipped file (make wasm FEATURES=none builds it).

Site. A new home page: "Lives anywhere. Hears everything." Each section — app state, sync, many writers on one file, traffic without a cache, scale by tenant, search by meaning, security, your language — is an animated scene with its measured proof.

Fixes

  • An image adopted during a running maintenance could be overwritten by that compact; the maintenance now fails instead.
  • snapshot writes only live records, so persist and openFile images drop dead ones.
  • now() works in the browser module (it is handed the page's clock).
  • CI names a failing test in its log and keeps the reports; five timing races in the Kotlin, Swift, Dart and fenec-http tests are fixed rather than retried.

What's Changed

Full Changelog: v0.1.9...v0.1.10