Repository navigation
Releases
fennecdb 0.2.0
fennecdb 0.2.0
The first release since v0.1.12: 720 commits. Read Upgrading before you install. The product, its binaries, its packages and its headers are renamed, and several new statements move the file format.
Upgrading
The rename: fenec is now fennec
Everything named fenec is now fennec, in one step and with no aliases. There is no fallback to an old name anywhere.
| Was | Is |
|---|---|
fenec, fenec-server, fenec-shard |
fennec, fennec-server, fennec-shard |
PyPI fenecdb |
PyPI fennecdb |
npm @fenecdb/* |
npm @fennecdb/* |
NuGet FenecDb |
NuGet FennecDb |
Maven com.fenecdb |
Maven com.fennecdb (fennecdb, fennecdb-android) |
pub.dev fenecdb, fenecdb_flutter |
pub.dev fennecdb, fennecdb_flutter |
Swift product FenecDB |
Swift product FennecDB |
Homebrew fenecdb/tap/fenecdb |
fennec-db/tap/fennecdb |
ghcr.io/fenecdb/fenec-server |
ghcr.io/fennec-db/fennec-server |
Go github.com/fenecdb/fenecdb/integrations/go |
github.com/fennec-db/fennecdb/integrations/go |
headers Fenec-* (Fenec-Wait, Fenec-Unsent, ...) |
Fennec-* |
variables FENEC_*, metrics fenec_* |
FENNEC_*, fennec_* |
file extension .fenec, schema.fenecql |
.fennec, schema.fennecql |
| FenecQL | FennecQL |
| Mac studio app bundle id | dev.fennecdb.studio |
What an app changes:
- Install the new package name and import the new module path. In Go,
go getchecks the path againstgo.mod, so the new path resolves from this release on. - Send
Fennec-*headers and read them in answers. - Rename scripts, units and dashboards that use the old binary names,
FENNEC_*variables orfennec_*metrics. - A
--dirnode finds its tenants by.fennec, and the router's directory defaults toshard.fennec: stop the node, then rename each<tenant>.fenecto<tenant>.fennecand each file beside it named<tenant>.fenec.*(its.synclog among them) to match, or its tenants are not found. A file named on the command line (--file) opens under any name. - Saved studio and desktop data is not migrated.
Files written by v0.1.12 still open (but see the next section: once 0.2.0 writes to one, earlier binaries refuse it). The rename kept the four on-disk magics (FENECDB\x01, FENECLG\x01, FENECSL\x01, FENECSYN) because renaming one would change the format. No file, archive or sync log is rewritten, and file-format.html says the magic keeps the format's first name. The domain moved to fennecdb.com.
Every record now carries a checksum (#568)
Every record 0.2.0 writes ends in a CRC32C and a claim of how far the file was durable when it was written. An open checks only what came after the last durable point it can prove, cuts a tail a power cut tore (and logs what it cut), and refuses damage in bytes that were already synced, naming the offset. fennec verify checks every record.
- Your first write moves the file. Nothing has to be enabled: once 0.2.0 writes to a file, no earlier binary opens it (
unknown record kind 131). To roll a primary back after that, restore its last backup from before the upgrade. - Followers keep following. An earlier replica, standby or archiver is sent records and images in the format it reads, so they keep following an upgraded primary, and what an earlier archiver kept still verifies and restores with its own binaries.
- Upgrade a region's nodes in one window. A tenant file an upgraded node wrote is refused by an earlier node, so a move, restore or failover onto one fails (a move leaves the tenant on its source). Upgrade every node of a region before anything moves a tenant between them.
- Files from earlier releases open as they were, and take checked records after their own.
- Cost: a lone
putmeasures +196 instructions (+0.9%); a keyed put and a 100-document put cost nothing measurable. Opening a 1 GB file takes as long as before.
Clauses that move the file format
Installing 0.2.0 changes nothing on disk. The first use of any clause below writes a record that older binaries refuse:
create statement(record kind 13), alone or in a block;create statement ... after(kind 13, op 3), a statement bound to a collection's writes;create statement ... everyor... at(ops 4 and 5), a statement run by the clock, and each run's mark;create statement ... on hook(op 6), a webhook consumer;- a field keeping
@textbeside@hash,@uniqueor@sorted(type tag 18,TAG_BESIDE); - a node recorded at an
https://address, or a region's router named by one.
Declaring a statement through a schema's apply, or creating a tenant with one, counts as a definition.
Upgrade order. Every binary that reads a tenant's file runs 0.2.0 before the first definition:
- every archiver (
fennec archive); - every router;
- every node: each replica and standby, and each node a move, a restore or a failover may put a tenant on;
- only then may a primary use a clause above.
For every/at, a tenant node of an earlier release takes no schedule: a tenant's schema declaring one is refused when placed on it, and a move onto it is refused at the install. For on hook, upgrade every router before every node, and every node before a tenant defines one.
For an https:// node the order is every router (each region's, and each standby following a directory), then every node, then record the node at https://.
What an older binary does where the order is not kept:
- A replica refuses the record ("record kind 13 is not a write", or "a statement record this version does not read") and connects again for ever. It takes no write past it. For tag 18 it stops with "unknown type tag 18".
- An archiver keeps the stream but takes no image of its own. Its
fennec verifyandfennec restorerefuse the archive. The new ones read and restore it. - A node of an earlier release refuses to open a file the new
fennec restorewrote. A move onto an older node fails at its install, and the tenant stays on its source. - An older router cannot resolve an
https://node. It sends the node nothing (never the admin token in plain HTTP), grants it no lease, and its tenants fail over where a standby exists. An older node refuses to follow anhttps://primary.
deploy/RUNBOOK.md has the rolling-upgrade order.
Security
- #523: nonces no longer fall back to the clock. A sealed archive's ChaCha20-Poly1305 nonce and SCRAM's client nonce (
fennec import,--follow) could come from a value derived from the clock when/dev/urandomcould not be opened, for example at the file-descriptor limit. Two frames sealed in the same tick under one archive key could then share a nonce, which exposes the XOR of both plaintexts and allows forged tags. Affected: sealed archives and backups (--key-file) and SCRAM sign-in. Randomness now comes fromgetrandomon Linux andgetentropyon macOS, which need no descriptor. If none is available, the seal or sign-in is refused. A refused seal leaves no file behind. If you seal archives or backups, upgrade. - JWT claims: a claim held as null, empty or of another kind widens no policy, and an ordered comparison against a claim holds the field to its kind (
Security:commits in the log). - Tokens:
--jwt-audienceand an issuer and client option hold a token to the issuer, audience and client you name. An ES256 token for another app is refused. - A cached token check is kept only under the keys it was checked against.
- #528: dependency updates for the advisories Dependabot and
npm auditnamed (Next.js, Lighthouse, wrangler, undici, body-parser, zod and others in tools, site and integrations; none in the crates, which still have no dependencies beyond the TLS tree). - The shell now takes
<file>.lockand refuses a file a server has open, which prevented a lost write.
REST API
No breaks, and no route deprecated. The API only grows (docs/design/http.md#compatibility). BREAKS in tools/openapi_compat.py is empty, CI holds the documents to a committed baseline, and a route removal would be announced first with the standard Deprecation and Sunset headers.
fennec-server now serves its own OpenAPI 3.1 document (#537), held to its routes. The router and tenant nodes serve theirs. The documents are in integrations/openapi/.
Routes added since v0.1.12 (all beside the existing ones, the first four also under /t/{tenant}/):
/_openapi.json, the document itself;/_call/{statement}, to call a named statement;/_hooks/{hook}, to take a webhook event;GET /{collection}/{id}, which answers the row with anETag; a write to it takesIf-MatchandIf-None-Match(#542);/_admin/tenants/{tenant}/hooks,.../hooks/{hook}and.../hook-secrets, for webhook consumers on tenant nodes.
Behaviours that are new but change no contract: answers past --http-gzip go as gzip (#556), scoped callers are held to --request-rate (#554), and a request the router never sent is its own 503 marked Fennec-Unsent.
New
Query language
- Named statements:
create statement,callandPOST /_call(#423, #430, #433, #438, #440). Typed arguments, run with an authority of their own. SDKs, studio, shell and MCPcall_<name>tools follow (#442, #443). - Statements bound to writes:
create statement ... after set|put|del ...runs in the block of the write that woke it (#466 to #478). - Scheduled statements:
everyandat, run once a slot by the file's primary or a tenant node (#484 to #492). - Webhook consumers:
on hook, events taken once by their key atPOST /_hooks/<name>(#496 to #514). require <n> else '<reason>'puts the reason in every refusal (#412).in $1takes one parameter holding the list;= ANY($1)is its SQL spelling (#449).- NaN has one total order, and an int and a float compare by their true values (#511, #520). A vector field compares with a list of numbers by its f32s.
- A numb...
v0.1.12
Highlights
Install with a package manager. brew install fenecdb/tap/fenecdb on macOS and Linux; curl -fsSL https://fenecdb.com/install.sh | sh, which checks the download against the release's SHA256SUMS and installs into ~/.fenecdb/bin without sudo; and a .deb and an .rpm for amd64 and arm64 with each release, installed and run in Debian and Fedora before the release is drafted. The release's tap formula is written from its own SHA256SUMS when it is published.
A server that stops when its parent does. fenec-server --exit-on-stdin-close runs the one shutdown (final sync, checkpoint, lock released, exit 0) once its stdin closes, so an app that starts a server and dies, even by kill -9, leaves no server holding the file. Every way a server stops now goes through that shutdown; a start that fails on its port exits at once and writes nothing to the file, and the exit codes are on the server page.
The studio takes its session from a host app. An app that embeds fenec studio hands it a frozen window.fenecHost.session for the page's own origin; the token never touches storage, and the studio shows no sign-in form under a host.
Docs. The menu follows what a reader is doing (Start, Clients, Guides, Reference, Operate, Tenants and sharding, Design and comparisons, Contribute). FenecQL is a tour plus eight reference pages, Tenants and sharding a tutorial plus seven pages; every old link still lands where it did. The HTTP page has curl and eight languages in tabs, the curl run against a real server in the tests. The site now tells "no buffer pool of its own" (the operating system keeps the file's pages in memory) apart from "usually needs no cache in front", the latter with its conditions and the YCSB comparison against Redis 7.4 behind it.
Upgrading from 0.1.11
- The repository is
fenecdb/fenecdb(it wasfenecdb/fenec; GitHub redirects the old URLs). - Go: the module is now
github.com/fenecdb/fenecdb/integrations/go. Change the import path andgo get github.com/fenecdb/fenecdb/integrations/go@v0.1.12; 0.1.11 and earlier keep the old path. - Swift: a package that moves to
https://github.com/fenecdb/fenecdbnames the product's package"fenecdb"(.product(name: "FenecDB", package: "fenecdb")); one that keeps the old URL keeps"fenec". - Server exit codes: a non-loopback
--httpwith no token is refused before the file is opened (exit 2, was 1); a failure after the server served exits 1 after the final sync, with no checkpoint.
What's Changed
- packages: the Flutter plugin waits for fenecdb's listing; Dart changelogs name each release by @furkankinyas in #386
- Site search: the vectors of #378's sections by @furkankinyas in #387
- fenec-server --exit-on-stdin-close, and the studio taking its session from a host app by @furkankinyas in #383
- fenec-shard tests: fail over only once the copy has taken its image by @furkankinyas in #389
- Docs: the nav by what a reader is doing, the index by task, curl and language tabs on HTTP by @furkankinyas in #388
- fenec-shard tests: wait on the copy's lineage, and say what a wait last saw by @furkankinyas in #394
- Repository renamed to fenecdb/fenecdb: every reference follows by @furkankinyas in #391
- docs: split FenecQL into a tour and eight reference pages by @furkankinyas in #390
- packaging: Homebrew, an install script, .deb and .rpm for each release by @furkankinyas in #392
- docs: split Tenants and sharding into a tutorial, five guides, a reference and the design by @furkankinyas in #393
- 0.1.12 by @furkankinyas in #395
- Package.swift: the XCFramework of v0.1.12 by @furkankinyas in #397
- docs: tell "no buffer pool of its own" and "needs no cache in front" apart by @furkankinyas in #396
Full Changelog: v0.1.11...v0.1.12
v0.1.11
Highlights
SQL's everyday spellings read as FenecQL. INSERT … ON CONFLICT, UPDATE … RETURNING, NOT IN, LIKE, then JOIN (a lookup, answered as flat rows), DISTINCT, EXISTS, CREATE TABLE/INDEX and pgvector's <->, <=>, <#>. One parser and one AST on every surface; what cannot keep SQL's meaning is refused, naming the FenecQL to write. Agents writing SQL by habit passed on the first try 30–35% of the time against 0.1.10's parser and 74–94% against this one, and within three tries 61–74% and 98–100% (the same 40 tasks, two runs, tools/agent-eval). New page: From SQL.
Typo-tolerant, search-as-you-type match. match … fuzzy [N] and prefix. With a typo in each query, nDCG@10 goes from 0.636 to 0.663 on SciFact and from 0.213 to 0.229 on FiQA. A text index also holds a word in 9 bytes of a table and 16 of a term, not 88 and three allocations: 500 tenants with live text indexes took 375 MB, now 173.
Writes that pick, wait and guard – what an app used a queue for.
set/del … order … limit … returningpicks and answers its rows: a claim of ten over a million jobs takes 18.7 µs against a scan's 132.7 ms; 16 threads move 185.8k jobs/s against 93.8k for read, then compare-and-set.Fenec-Wait: <ms>holds a claim that wrote nothing until it can: 0.38 ms p50 to a held worker, against 0.83 ms polling every 10 ms.ordertakes an expression andputtakesreturning: the nearest of 300 000 ready orders is claimed in 0.059 ms, where three statements took 0.135.put … if absent else setupserts;require <n>makes a write's or aget's row count a condition (412);limit,offsetandtoptake parameters.
Indexes, types and aggregates.
@sorted(owner, created desc),@unique(org, slug): a user's latest 20 of a million posts in 6.3 µs, against 11.8 through@hashand 21 ms by scan.email text nocase: compared by Unicode case folding, kept as written.geopoints withdistance,within,near,@geo: 7.2 µs within 100 m over a million points (Redis 12.6 µs, PostGIS 1.26 ms).- Expressions in
select,groupby several keys,bucket(at, 1d, 'Europe/Berlin'),first/last,count(distinct),having,approx_count_distinct: 60 one-minute bars in 1.7 ms, where 120 queries took 195.
Access control. A JWT reaches only the tenant it names. Grants per operation, update(a, b) and read(a, b) by field, append-only collections, transitions (new.) and rules that read another collection. An empty token is no token.
Writers wait for less. Long reads run on a pinned copy with no lock held (a ledger's reconciliation held transfers 187–512 ms, now 5–29). A hash or text index grows a 256th at a time (longest put at 4 million keys: 235–267 ms, now under 4). A file is compacted before it outgrows the page cache (5M updates in a 2 GB container: 358–511 s, now 80–100).
Regions and tenants. Nodes have a region and a zone; a tenant lives in its node's region, its copy in another zone. A region can keep its own directory and lease and fail over by itself, so one cut off from the global router goes on writing (1 s lease: tenants writing again on replicas 1.41–1.70 s after the cut). A tenant can keep read replicas in other regions; a nearby router answers marked reads from them, never from before the client's own write (Frankfurt to Singapore was 158 ms a read). One URL reaches every region through a Cloudflare Worker. Tenants get quotas, POST /_shard/query merges a read across them, and fenec archive --tenants archives a node over one connection: 1 000 tenants held 16 node threads, a stream each 1 016.
Failover and leases hold under delay. A grant read late gives no lease past a failover; the lease runs on the boot clock, so a suspend counts; a write answered after its lease lapsed returns 500 "outcome": "unknown", not 200; lease rounds no longer drift (1.18 s apart under load, now 1.00 s). A failover ends the requests the router had out to the node it left: in the drill its writers wrote again 1.9–2.5 s after the kill, not 3.9. A replica that failed to attach is retried and counted (fenec_router_tenants_unreplicated); a connection no thread can be made for gets 503 with Retry-After, not a reset.
Around the database. fenec-server --studio serves a grid, query editor, schema and live views at /_studio/, with no authority beyond the token you paste; the site's Playground is the same studio. --mcp and fenec mcp give agents schema, search, query and get tools. Request ids, OTLP traces, Datadog and Grafana packs. deploy/ holds systemd units, a runbook, alert rules and make drill, a two-region failover drill (three runs: 41 577 writes acknowledged, 0 lost). Every SDK can read near a tenant's replica; the Swift, Kotlin and Dart remotes also batch with idempotency keys. New docs pages: Analytics, Geo, Queues, Studio, MCP, Build from source; the Quickstart now starts from what a registry holds (the playground, npm, the image or a release tarball, the shell), each path a few commands with the output to expect, and every code block has a copy button. A collection picked in the studio's query editor goes in only where the caret was put.
Fixes
- A JWT minted for one tenant read every other tenant on a
--dirnode. - Guessing tokens was not slowed: a refusal's wait restarted on any answer but a 401, and
Fenec-Afterheld a thread up to 30 s before its token was asked. - The shell ran each closed line:
del noteswithwhere id = 3under it deleted every row. - The router answered 502 after a quiet minute on macOS, sent a write twice when a node closed, and deadlocked at start and on a refused move.
limit 5000000000wrapped to 705 million in the browser module.
Upgrading from 0.1.10
- Files. 0.1.10 refuses a file with a
geofield, an index over several fields or anocasefield (type tags 15–17, index kind 10); there is no going back. On Linux a durable write also syncs<file>.sync; after a power loss open the database before copying it. - Behaviour.
requiredrefuses an explicitnull.ORDER BY 2andGROUP BY 1(withBY) are places in the list;order 1is unchanged. The slow log is JSON; an admin event'sstatusishttp_status. - Tokens. A JWT needs
exp(--jwt-require-exp off) and, on a--dirnode, atenantclaim (--jwt-unbound-tenantsrestores the old reach).updateanddeletegrants needread. An empty token flag is refused at start. - Defaults. A
--dirnode setting neither--tenant-max-streamsnor--tenant-max-heldgives each a quarter of--max-connections. - Size.
fenec.wasmis 273 KB brotli (279 434 bytes), from 183 (187 831). - Rolling upgrade. Standbys before primaries, nodes a zone at a time, the entry Worker last; every router before regions are turned on. A late grant is covered once routers and nodes both run numbered grants; a node holding a lease term refuses an older router until restarted.
What's Changed
- Where one request's time goes, and the durable gap closed by @furkankinyas in #223
- AGENTS.md is written from CLAUDE.md, and CI holds them together by @furkankinyas in #224
- Site: one menu on a small screen, the sidebar kept in place, the home's dunes on every page by @furkankinyas in #225
- Playground editor coloured as it is typed, every home session in its language by @furkankinyas in #227
- Site: the band under the header rises in and moves on scroll as the home's dunes do by @furkankinyas in #228
- CI runs the highlighter test by @furkankinyas in #229
- Security and correctness gaps from the real-world spike by @furkankinyas in #230
- The site searches itself, with fenecdb in the reader's tab by @furkankinyas in #226
- fenec-server's one-client read gap: a plain get written as JSON from the stored rows by @furkankinyas in #233
- A shop on fenecdb: Next.js over fenec-server, measured and tested by @furkankinyas in #232
- The shop pins the patched tmp and uuid under its Lighthouse CLI by @furkankinyas in #234
- The shop's tmp override goes to 0.2.7 by @furkankinyas in #235
- Security gaps 2: per-operation grants, append-only, list claims, distinct subquery bound, get require, scoped BM25 by @furkankinyas in #236
- Two flaky file tests: a compact's dead copies, and a lock a child process held by @furkankinyas in #238
- The shop's gaps closed: client batches, warm-up, disjunctive and range facets, polling by @furkankinyas in #239
- A payments ledger example: guarded blocks, an append-only journal, reconciliation, a sink by @furkankinyas in #240
- Expressions in select, aggregates over them, group by several keys and bucket, count(distinct), first/last by @furkankinyas in #241
- Close the six gaps the payments ledger hit by @furkankinyas in #242
- The site's fonts come from it, and their fallbacks take the room they will by @furkankinyas in #243
- Trellis: a multi-tenant team workspace with auth, tenancy and security on fenecdb by @furkankinyas in #244
- Kestrel: product analytics and market data on fenecdb, an example by @furkankinyas in #245
- Trellis's six gaps closed: preflight, token expiry, the router's refusal wait, scoped live queries,...
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
v0.1.9
Highlights
connect() works in browsers again. FenecHttp called fetch as its own method, which browsers reject with "Illegal invocation". Node did not show it, so every page that used connect() without passing its own fetch failed. Fixed and covered.
The package each page needs.
@fenecdb/web/client: the HTTP client, the builder and live queries over the server's stream. It holds no WebAssembly, sync or storage, and a test holds it to that. Aconnect()app bundles 5.7 KB brotli through it.fenec-replica.wasm, opt-in: 146.9 KB brotli against the full module's 173.7, with no HNSW graph.sync()still loads the full module, because a graphlessnearis 10–40× slower; the docs' "Which package" table gives the numbers.nearwithout the graph answers exactly instead of refusing, in the replica and lite modules. It is held to the full module'snear ... exactrow for row.
Fixes
- With an f16 field and cosine,
near ... exactscores changed after a reopen (0.938902 → 0.939080). sync({ shapes: [{ collection: table }] })now takes a table declared in code, as the docs write it.- The Swift tests no longer hang. A synced database's
close()waits off the cooperative pool. - The Maven Central job waits for the deployment and fails when it is refused.
Examples. The same Notes app in TypeScript, React, Node, Python, Go, .NET, Rust, Swift, Kotlin and Flutter, in examples/. Each is built and run in CI.
Compare. New pages comparing fenecdb with PostgreSQL + pgvector, SQLite and PGlite, under Docs → Compare. Every claim about the other product links its source.
What's Changed
- The Maven Central bundle zips com/, where the coordinates now are by @furkankinyas in #200
- Compare pages: PostgreSQL with pgvector, SQLite and PGlite by @furkankinyas in #201
- The Maven Central job waits until the deployment is published by @furkankinyas in #202
- Phase 60: a client entry with no engine, an opt-in replica module, exact near without the graph by @furkankinyas in #203
- 0.1.9 by @furkankinyas in #204
- Examples: the same Notes app in every language by @furkankinyas in #206
- The Swift tests stop hanging; a synced close() waits off the pool by @furkankinyas in #208
- Package.swift: the XCFramework of v0.1.9 by @furkankinyas in #205
Full Changelog: v0.1.8...v0.1.9
v0.1.8
Highlights
SDKs for every platform.
- New SDKs: Go (
go get github.com/fenecdb/fenec/integrations/go@v0.1.8) and .NET (FenecDbon NuGet) talk tofenec-serverover HTTP. - One query builder in four languages: Python, JavaScript, Go and .NET build the same FenecQL from the same chain. A 175-case golden file checks this in CI.
The engine in apps. fenecdb now runs inside native apps: Swift (SwiftPM, iOS/macOS), Kotlin (com.fenecdb:fenecdb, com.fenecdb:fenecdb-android) and Dart/Flutter (fenecdb, fenecdb_flutter). Each has:
- a file on the device;
- the same builder;
- live queries for SwiftUI, Compose and Flutter;
- sync with a server: offline writes survive restarts and land exactly once.
State in the page. A local Fenec has live queries with no server, and useLiveQuery works with it.
The schema in code.
- Declare it in TypeScript with Drizzle 1.0's syntax (
fenecTable,defineRelations,$inferSelect), or as aschema.fenecqlfile in any SDK. - At open, safe differences are applied and destructive ones refused with their fix. Migrations run once.
fenec typeswrites TS, Python, Go, C#, Swift, Kotlin and Dart.
Queries.
in (get ...)subqueries.@ttlfields: expired rows are never read, and the primary sweeps them.- Long
inlists use a hash lookup: 2 000 values over 200 000 rows went from 2.3 s to 16 ms.
Sync. The browser's sync and the native core are held to 55 shared scenarios. The browser now:
- keeps a write through network failures and retries it;
- reaches an unanswered insert's row on update or delete;
- keeps pending writes across reloads;
- sends only from the leader tab.
Reads beside writes. The longest read beside large write batches went from 17.4 ms to 4.8 ms.
Sizes. The browser module is 523 KB raw, 208 KB gzip and 174 KB brotli. The schema check added 7.5 KB brotli of that.
What's Changed
- RELEASING.md: the rename note went out with 0.1.7 by @furkankinyas in #186
- Phase 53: Go and .NET SDKs over HTTP by @furkankinyas in #187
- Bump cloudflare/wrangler-action from 3 to 4 by @dependabot[bot] in #178
- Phase 54: the query builder in the Python, Go and .NET SDKs by @furkankinyas in #188
- Subqueries and expiry: in (get ...) and @Ttl by @furkankinyas in #189
- The builder table: one call per cell, and why Python's starts with collection by @furkankinyas in #190
- Phase 55: live queries on a database in the page by @furkankinyas in #191
- Phase 56: the embedded engine in native and mobile apps by @furkankinyas in #192
- TypeScript examples, type-checked in CI; toFenecQL is not a step by @furkankinyas in #193
- Phase 57: native apps sync with a server by @furkankinyas in #194
- Phase 58: the schema in code — Drizzle 1.0 syntax, a FenecQL schema file, one planner by @furkankinyas in #195
- Phase 59: the browser's sync keeps every write, held to the native core by 55 shared scenarios by @furkankinyas in #196
- 0.1.8 by @furkankinyas in #197
- swift-binary builds fenec-server before the Swift tests by @furkankinyas in #198
- Package.swift: the XCFramework of v0.1.8 by @furkankinyas in #199
Full Changelog: v0.1.7...v0.1.8
v0.1.7
fenec-pg is now fenec-server, and it speaks HTTP alone
fenec-pg has been renamed fenec-server, and it no longer speaks the PostgreSQL wire protocol. The binary, the release archives' file and the image (ghcr.io/fenecdb/fenec-server) are renamed, and nothing keeps the old name.
Clients reach the server over HTTP (--http, default 127.0.0.1:8080).
Removed:
- Flags:
--listen,--password,--reader,--auth,--user,--idle-in-transaction-timeoutand--max-message. - Interactive transactions,
COPY, thepg_cataloganswers andpg_stat_statements./_stats/statementsstays.
Kept: fenec import from PostgreSQL and --follow still read PostgreSQL through fenecdb's own client.
Each language now has an HTTP example that runs in CI: Your language.
Also in this release
jsonfields: objects, paths into them (meta.source.rank), and@hash,@uniqueand@sortedon a path.@uniquefields andalter collection(add, rename and drop a field without rewriting a document).- Reads beside large write batches wait at most 4.8 ms, down from 17.4 ms, because the handover now also runs by write count.
What's Changed
- Publish @fenecdb/cloudflare and @fenecdb/langchain with the release by @furkankinyas in #154
- Version 0.1.6 by @furkankinyas in #155
- Grow nothing in the browser module by doubling past a mebibyte by @furkankinyas in #156
- Read a loaded image's documents in place in the browser module by @furkankinyas in #157
- Make a browser image a chunk at a time as it is taken by @furkankinyas in #158
- Read the writes on disk as JSON lines: GET /_changes by @furkankinyas in #159
- Keep a change consumer's cursor on the server by @furkankinyas in #160
- Follow the change stream from Python, and relay it on by @furkankinyas in #161
- Make a write once with an Idempotency-Key by @furkankinyas in #162
- Let a read on a replica wait for its client's write by @furkankinyas in #163
- Give the pg wire a reader that writes nothing by @furkankinyas in #164
- Make insert refuse an id that is taken by @furkankinyas in #165
- Hold a vector written again as one node of the graph by @furkankinyas in #166
- Seal an archive and a backup with a key by @furkankinyas in #167
- Seal what persist keeps in IndexedDB with a key by @furkankinyas in #168
- Take a JWKS file's keys: HS256 and RS256, rotated by kid by @furkankinyas in #169
- Log logins, refusals and schema changes; make a failed login wait by @furkankinyas in #170
- Redesign the site and make the docs plain by @furkankinyas in #171
- Search scene first, themed scrollbars, seamless docs header, two-line claim by @furkankinyas in #172
- Let Npgsql connect, and test .NET in CI by @furkankinyas in #173
- Header current link, full-width docs fade, cards on the first screen by @furkankinyas in #174
- Java, PHP and Ruby in CI; Ruby's pg works; one header everywhere by @furkankinyas in #175
- Phase 45: @unique fields and alter collection by @furkankinyas in #177
- @fenecdb/cloudflare is on npm by @furkankinyas in #179
- Phase 46: json fields, paths and indexes on a path by @furkankinyas in #180
- Phase 52: fenec-server speaks HTTP alone; PostgreSQL wire compatibility removed by @furkankinyas in #181
- A handover also runs every 65 536 writes by @furkankinyas in #182
- The hero's cloud turns by hand by @furkankinyas in #183
- The follow and mirror figures, measured again by @furkankinyas in #184
- 0.1.7 by @furkankinyas in #185
Full Changelog: v0.1.6...v0.1.7
v0.1.6
What's Changed
- Publish the packages with a token when the registry's secret holds one by @furkankinyas in #61
- Publish a local tarball to npm, and let a second run skip what went out by @furkankinyas in #62
- Answer a write whose lease lapsed past the door 503, as the door would by @furkankinyas in #64
- Install the Python package from PyPI, and note npm's answer to a missing scope by @furkankinyas in #63
- Prune the lists a batch joins in parallel, grouped by list, into the same graph by @furkankinyas in #65
- Write aarch64's f32 and f16 distance strips out in NEON, to the scalar bits by @furkankinyas in #66
- Measure a walk's neighbours four at a time on aarch64, to the same bits by @furkankinyas in #67
- Measure the docs' build, search and linking figures again after 12.1-12.3 by @furkankinyas in #68
- Restore a graph with its norms summed side by side and its links decoded inline by @furkankinyas in #69
- Measure writers and readers at once against SQLite: make concurrency-bench by @furkankinyas in #70
- Lay a graph record out flat: a list's first link whole, its steps in fixed widths by @furkankinyas in #71
- Read each document's vector field on open only when a graph's nodes are fewer than the documents by @furkankinyas in #72
- Wait for the router to record the replica a lease's repair attached by @furkankinyas in #73
- Build the hash, text, ordered and sparse indexes when a statement first reads each, not on open by @furkankinyas in #74
- Fill a restored graph's arena a share of nodes to a thread, each written where it stands by @furkankinyas in #75
- Keep each document's node in a dense array where the ids are, as the store keeps its locations by @furkankinyas in #76
- Write an index of each image's data record behind its id counter, and open mapped files from it by @furkankinyas in #77
- Copy each frame as it stands into its segment when a load reads the file into memory by @furkankinyas in #78
- Let readers read what has landed beside a transaction held open, rather than wait for it by @furkankinyas in #79
- Write a vector's components as the f32s they are, in a third of the time by @furkankinyas in #80
- Keep the numbers of an HTTP query's parameters as they were sent by @furkankinyas in #81
- Read a page of vectors 3.4 times faster: numbers by division, JSON by bytes by @furkankinyas in #82
- Read a row's fields as the filter asks for them, without keeping a copy by @furkankinyas in #83
- Hand a vector parameter to the browser module as its f32s, not as text by @furkankinyas in #85
- Index a document's terms straight into their lists, and hash the browser's index maps faster by @furkankinyas in #86
- Measure the module's sizes and a page's storage again, as Faz 15 left them by @furkankinyas in #87
- Hand vectors to a module from before f32 vectors as JSON by @furkankinyas in #88
- Bind a filter to its collection once a query, and test rows against it by @furkankinyas in #89
- Decode a row's text into the text its slot held by @furkankinyas in #90
- Note the text slot reuse and the order keys that were measured and left out by @furkankinyas in #91
- Ask for a walk's next list and its neighbours' vectors ahead of reading them by @furkankinyas in #92
- Measure the docs' build, search and open figures again after 13-17 by @furkankinyas in #93
- Write a kept graph's lists on every core, and its bytes after the lock by @furkankinyas in #94
- Sync a node's tenants with the fsync outside their lock by @furkankinyas in #95
- Say what a kept graph and the periodic sync cost a server's writes by @furkankinyas in #96
- Measure what a request costs over the wire, and parse a statement once where the protocol lets it by @furkankinyas in #97
- Walk FenecQL's bytes, and read a list of numbers as the vector it is by @furkankinyas in #98
- Say what a request over the wire costs by @furkankinyas in #99
- Spread an exact search over the cores, and keep only its nearest k by @furkankinyas in #100
- Measure a filtered near no row near the query matches, and say what a million costs by @furkankinyas in #101
- Measure what loading rows costs each way a client can send them by @furkankinyas in #102
- COPY FROM STDIN in fenec-pg: text and CSV, one block, 10 000 rows a put by @furkankinyas in #103
- The graph keeper passes over an open block rather than park it or wait for it by @furkankinyas in #104
- Read a JSON array of numbers straight into a vector's f32s: HTTP and COPY loads 1.6-1.8x by @furkankinyas in #105
- Walk a simple query's text only where its statement needs it: pg simple put 79k -> 114k rows/s by @furkankinyas in #106
- Link a block's vectors together: executemany and /batch with HNSW 5.4k -> 16.9k rows/s by @furkankinyas in #107
- Say what loading rows costs each way, against PostgreSQL's COPY by @furkankinyas in #108
- Send a result's columns in the binary format Bind asks for: pgx, tokio-postgres and asyncpg read rows by @furkankinyas in #109
- Name each parameter's type where its place names one: tokio-postgres and asyncpg bind parameters by @furkankinyas in #111
- COPY in PostgreSQL's binary format, and a plain SELECT of columns read as a get: asyncpg and pgx load rows by @furkankinyas in #112
- Say which drivers are held to their own flows, and what binary COPY loads by @furkankinyas in #113
- Let pgvector's clients find its types: to_regtype, parameter types from casts, bit by @furkankinyas in #114
- Read WITH and WITH RECURSIVE in the catalog, as asyncpg introspects a type by @furkankinyas in #115
- Vectors as pgvector's types, in its binary formats by @furkankinyas in #116
- Look at a reopened replica's file before its follower starts by @furkankinyas in #117
- Hold pgvector's client libraries to their flows beside their drivers by @furkankinyas in #118
- Read a text parameter as the field its place names by @furkankinyas in #119
- Measure fenec-pg against pgvector at scale, both over the pg wire by @furkankinyas in #120
- Walk the upper layers with a beam of four, in a search and in a build by @furkankinyas in #121
- Size a filtered near's set before gathering it, and widen its beam to pass the page by @furkankinyas in #122
- Put fenec-pg against pgvector at scale in the docs by @furkankinyas in #123
- The scale bench breaks fenec-pg's memory down, and measures it started again by @furkankinyas in #124
- Hand the documents written since the open over to the mapped file by @furkankinyas in #125
- Put what each server holds at scale in the docs by @furkankinyas in #126
- Count an open block's buffers, and measure the load's peak by @furkankinyas in #127
- Spill a block that outgrows 16 MB into the file before it lands by @furkankinyas in #128
- Put a load's peak memory in the scale benchmarks by @furkankinyas in #129
- Lex a list of numbers alone into its vector at once by @furkankinyas in #130
- Send a list as PostgreSQL's array of its element's type by @furkankinyas in #131
- Hold each driver to reading and binding lists as arrays by @furkankinyas in #132
- Document lists as PostgreSQL arrays over the wire by @furkankinyas in #133
- Read a binary COPY's list cell as its element's array by @furkankinyas in #134
- COPY a collection TO STDOUT, in text or CSV by @furkankinyas in #135
- COPY a collection TO STDOUT in PostgreSQL's binary format b...
v0.1.5
Highlights
- Queries.
lookupattaches another collection's documents to each row. It can be chained, andrequiredlets the children decide which parents appear. There is an ordered index (@sorted), andinandidare answered from an index. Also new:explain, aggregates, and collation (ICU's root order and its Turkish tailoring) on a query or on a field. - Search. Quantized HNSW indexes (
quant=int8, andquant=bitwith centred codes). Sparse vectors (sparse<N>with@inverted, pgvector'ssparsevec).fuseranks BM25 and vectors together, and text in scripts written without spaces is indexed. - Storage. The file is mapped, and every write is a block that lands whole.
ROLLBACKand fsync are honest, with a group commit. The graph is crash-safe and a server keeps it in its file.create indexandcompactrun beside the database. - Transactions. Atomic batches. pg transactions with savepoints and schema changes, including transaction control written in one text.
- Replication and scale-out. Replicas and point-in-time restore from an archive.
--followmirrors a PostgreSQL table, served by the server that follows it. Tenant nodes run behind a router, with lease-based automatic failover and a replica of its own for each tenant. - Browser. A database is kept in IndexedDB or in a file of the origin private file system (
openFile). A module can be built with only the indexes a page uses. The full module went from 508 KB to 405 KB (134 KB brotli), and it is faster. - Integrations. The LangChain and LlamaIndex stores have text and hybrid modes. React has
useLiveQuery. The pg catalog serves psql, JDBC and DBeaver. There is/_metrics, and statement statistics. - Packages.
fenecdbon PyPI, and@fenecdb/weband@fenecdb/reacton npm, are published when a release is.
docker pull ghcr.io/fenecdb/fenec-pg:0.1.5What's Changed
- Add lookup: another collection's documents, attached per row by @furkankinyas in #14
- Stop fully sorting a lookup's children when its limit says not to by @furkankinyas in #16
- Add
requiredto lookup: let the children decide who appears by @furkankinyas in #17 - Reach lookup from the query string, the way the filters already read by @furkankinyas in #18
- Answer the existence check without building a list to throw away by @furkankinyas in #20
- Let
requiredbe answered from whichever side is smaller by @furkankinyas in #21 - Answer
inandidfrom an index instead of scanning by @furkankinyas in #15 - Skip the equalities a child cannot index instead of losing the plan by @furkankinyas in #24
- Say that main takes no direct pushes by @furkankinyas in #13
- Chain lookups: another collection's children, one level further down by @furkankinyas in #25
- Scale out by tenant: a file each, many per node, a router in front by @furkankinyas in #26
- Match the README brotli claim as it now reads by @furkankinyas in #27
- Phase 0: honest ROLLBACK and fsync, paged scans, wasm SIMD, fair numbers by @furkankinyas in #28
- Phase 1: ordered index, probed filtered near, explain, crash-safe graph, group commit, incremental persistence by @furkankinyas in #29
- Phase 2: replicas, PITR, online maintenance, scoped access, aggregates, fuse, follow, catalog, collation, integrations, metrics by @furkankinyas in #30
- Phase 3: the file is mapped, quantized indexes, tenant nodes on the wire with replicas by @furkankinyas in #31
- Sparse vectors: sparse, @Inverted, and near by dot product by @furkankinyas in #32
- Phase 4: correctness debt by @furkankinyas in #33
- Phase 5 (part 1): rewrites, checkpoints, the standby router, BEIR's [SEP] by @furkankinyas in #34
- 5.3: quantized near reads only what can make the page by @furkankinyas in #36
- Phase 6: a server answers before its graph is linked; field collations by @furkankinyas in #37
- Bump sharp and @huggingface/transformers in /crates/fenec-bench/beir by @dependabot[bot] in #35
- Phase 6 (part 2): every script's collation, text written without spaces, the browser module by feature by @furkankinyas in #38
- Phase 7: graphs kept in the file, sparse near summed, the stores' text and hybrid modes, statement counts by @furkankinyas in #39
- Phase 8, part 1: centred bit codes, the router's metrics, compact beside the database by @furkankinyas in #40
- Phase 8, part 2: serve a --follow mirror from the server that follows it by @furkankinyas in #41
- Give the sizes the module and the binaries have now by @furkankinyas in #42
- Phase 9, part 1: a page's database in a file of its own by @furkankinyas in #43
- Phase 9, part 2: bit codes meet the query in popcounts by @furkankinyas in #44
- Phase 9, part 3: a replica of its own for each tenant by @furkankinyas in #45
- Phase 9, part 4: atomic batches and pg transactions (9.4) by @furkankinyas in #46
- Phase 10, part 1: publish the packages when a release is published (10.1) by @furkankinyas in #47
- Phase 10, part 2: automatic failover on a lease (10.2) by @furkankinyas in #48
- Phase 10, part 3: savepoints by @furkankinyas in #49
- Phase 10, part 4: schema changes in transactions by @furkankinyas in #50
- Phase 10, part 5: transaction control in one text by @furkankinyas in #51
- Phase 10, part 6: one record walk, one head coder, fewer cfgs by @furkankinyas in #52
- Phase 11, part 0: make test in minutes, not an hour by @furkankinyas in #53
- 11.1: Report where the browser module's bytes go by @furkankinyas in #54
- 11.2: Write floats as {} does, without the standard library's formatting by @furkankinyas in #55
- 11.3: Compile the standard library's sorts and maps for fewer types by @furkankinyas in #56
- 11.4: Put strings in a case, and slice them, without a panic's formatting by @furkankinyas in #57
- 11.5: Link the browser module with its relocations written short by @furkankinyas in #58
- 11.6: Build the shell's HTTP client for size, and report a native binary by crate by @furkankinyas in #59
- Release 0.1.5 by @furkankinyas in #60
New Contributors
- @dependabot[bot] made their first contribution in #35
Full Changelog: v0.1.4...v0.1.5
v0.1.3
fenec-pg is 966 752 bytes against 0.1.2's 983 264, and the container
image is 1.23 MB against 1.25.
0.1.2 moved FenecQL and JSON onto a hand-written decimal parser so the wasm
module could drop Eisel-Lemire's 12 KB table of powers of five. The server
was left reaching for str::parse::<f64>() as well, on the grounds that
PostgreSQL's float8 accepts inf and the new parser does not — so it
shipped carrying both the table and the parser meant to replace it.
That turned out to be four lines of work rather than a reason. The specials
are recognised explicitly — an optional sign, then inf, infinity or
nan, case-insensitive, -nan keeping its sign bit, which is exactly what
str::parse took — and every actual decimal goes to the shared parser.
| 0.1.2 | 0.1.3 | |
|---|---|---|
fenec-pg, linux/amd64 |
1 241 760 | 1 221 280 |
| container image, amd64 | 1.25 MB | 1.23 MB |
dec2flt table in the binary |
yes | no |
The wasm module is unchanged at 295 564 bytes: none of this reaches it.
One behaviour moved
A float in an HTTP query string is read the way a float in a JSON body and a
float in FenecQL are read, so ?x=inf is no longer a number. It never
was in the other two; the query string accepted it only because it reached
for a different parser. Everything that is actually a decimal is unaffected,
bit for bit.
Still paid for
The default fenec binary keeps the table, deliberately: fenec-import
reads pgvector's text with parse::<f32>(), and routing that through the
shared parser before narrowing would round twice. A vector component is not
worth being slightly wrong about. make small does not include import, and
has no table.
Verifying a download
SHA256SUMS covers every archive.
docker pull ghcr.io/fenecdb/fenec-pg:0.1.3
Multi-arch, linux/amd64 and linux/arm64 — scratch plus a static musl
binary, so there is no shell, no package manager and no libc in it.