A data transfer protocol that shares the schema once, not on every response.
FlyWire — schema-aware, binary-capable record transport
A client fetches a table's schema once, at session start, then caches it. Every response after that carries only values, at the fixed byte offsets the cached schema already describes — no field names, no per-message type metadata. Two encoding strategies are available per table: a lean, human-readable default, and a configurable fixed-width binary strategy with string pooling for cases that need real random-access speed or want data that isn't sitting in the clear.
What's actually proven, not just designed
Smaller, for real
Pooled binary beats best-case positional JSON on size at every scale tested — real Postgres data, not synthetic — with the margin holding steady as the data set grows.
True O(1) random access
Every record sits at a known, fixed offset. Fetching one record never means reading the rest — thousands of times faster than a full re-parse at scale, for either JSON or FlyWire's own plain-text strategy.
Real relational data
A genuine, Postgres-enforced foreign key
(maintenance_records.asset_id → assets.asset_id),
one-to-many, queried and round-tripped through the full pipeline
— not a placeholder ordinal standing in for a relationship.
Native parsing, independently verified
Migrated off a vendored, pure-JS parser onto Anvil Native — a real C reference implementation, zero-copy and forward-only, no payload data ever held in the parser itself. Benchmarked against the JS parser at every scale from 100 to 10,000 records; three real regressions found along the way, each one independently rebuilt and re-tested here before being trusted. Wins outright now, at every scale tested, in both conditions measured.
Full CRUD, schema-validated
Create, Read, Update, and Delete — including batch writes and
a real where{} condition primitive — proven end to
end over real HTTP against real Postgres. Every write is
validated against the session's own cached schema before it
becomes SQL; client input never becomes SQL text directly.
Told straight, not just the good parts
Pooled binary's size and random-access wins come with a real,
measured cost: encoding is slower than JSON.stringify
(the two-pass dedup work that makes the size win possible isn't
free), and full-set bulk round-trip time currently loses to JSON
at scale — the database query and encode stages still dominate
total time, and neither is what the parser migration touches.
Anvil Native's own stage — reading the wire message back out on
receipt — now wins outright at every scale tested; getting there
took three rounds of real regressions found and fixed, reported
as plainly as the wins. Both sides of that story are in the
testing and metrics reference — not smoothed over because parts
of it are inconvenient.
Where this stands
Pre-release. The core protocol — schema handshake, both encoding
strategies, string pooling, a real database adapter, schema
generation with drift detection, and full CRUD (including batch
writes and schema-validated conditions) — is built and tested
against a real PostgreSQL database, over real HTTP. The ANVL
parser itself has migrated to Anvil Native, with a working
server-side facade and a verified web-client facade
(anvil-wasm). AQL — a structured query language that
replaces hand-written SQL on the request side too — is the next
major design work. Full status, reasoning, and open questions
live in the docs.