Repository navigation
v0.1.10
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 absentanswers 1 or 0, so a lock is one statement; with@ttlit expires, and an expired row no longer blocks a write.affectedis exact on every path, sowhere version = 3is 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.
snapshotwrites only live records, sopersistandopenFileimages 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
- Phase 61: highlights, snippets and facets by @furkankinyas in #207
- packages.yml: the replica module, pub.dev's index, a version Central has by @furkankinyas in #209
- The package table says everything the replica module cannot do by @furkankinyas in #210
- The replica module is gone by @furkankinyas in #211
- The home page tells what fenecdb is: lives anywhere, hears everything by @furkankinyas in #212
- The hero's rings run the mark's light by @furkankinyas in #213
- The home page tells each section as a scene, not code by @furkankinyas in #214
- A file compacts itself once half of it is dead (includes and supersedes #215) by @furkankinyas in #216
- YCSB: fenecdb as a general database, verified and held to YCSB itself by @furkankinyas in #215
- The module without the indexes is a test build, shipped by nothing by @furkankinyas in #217
- CI names its failing tests; the Kotlin flake and its siblings made deterministic by @furkankinyas in #218
- Phase 62.1-62.2: expressions in set, and conditional writes by @furkankinyas in #219
- Two fenec-http tests that failed under load wait for their events by @furkankinyas in #220
- Version 0.1.10 by @furkankinyas in #221
- Package.swift: the XCFramework of v0.1.10 by @furkankinyas in #222
Full Changelog: v0.1.9...v0.1.10