Build logWeek 36 · v0.9.0-alpha

Every Friday, what we shipped and what broke.

Releases, engine notes, RFCs and the occasional confession. Newest first. The same entries go out by email to anyone on the waitlist who asked for them.

Entries
8
Commits
384
Pull requests
67
Subscribe via RSS ↗
Week 36
releasev0.9.0-alpha

Rules now run on the device

Permission functions are compiled once and checked on the client before a write lands, then again on the server. Rejected writes roll back locally in the same frame.

Until this week a forbidden write looked fine on the device for a few hundred milliseconds, then quietly disappeared when the server said no. That felt like a bug to users, because it was one.

Rules are now plain TypeScript functions compiled to a small bytecode that both the client and the sync server execute. The client check gives instant feedback; the server check stays the source of truth.

  • allow() accepts sync and async predicates
  • Rejected writes roll back locally and emit a typed error
  • Rule bytecode is cached per schema version
  • Breaking: permissions moved from kiln.config.ts into the schema
Commits
87
PRs
14
People
9
Week 35
devlog

Why we rewrote the merge loop (again)

The second version was correct and too slow on phones with 40,000 pending ops. The third version batches by row and is 6× faster on the same fixture.

Correctness came first, so v2 replayed every op in causal order. On a real device that had been offline for a weekend it took four seconds to catch up, which is three and a half seconds too long.

v3 groups ops by row before applying them and only falls back to full replay when a CRDT column needs it. The benchmark script and fixture are in the repo under bench/merge.

  • Merge of 40k ops on a Pixel 8: 4.1 s → 0.68 s
  • Memory peak during catch-up down 52%
Commits
41
PRs
6
People
4
Week 33
releasev0.8.0-alpha

Partial sync, first cut

Clients can now subscribe to a slice of a table, by team or by a simple where-clause, instead of syncing everything they are allowed to read.

This is the most requested feature in Discord by a distance. The first cut supports equality filters and a single join; anything more complex is tracked in issue 342.

  • sync({ by }) and sync({ where }) on tables
  • Server keeps one cursor per subscription, not per client
  • Known gap: changing a filter re-downloads the slice
Commits
112
PRs
19
People
11
Week 31
community

A thousand people in Discord, and what they asked for

We read every thread from the last month and sorted them into a list. Partial sync won, native clients came second, and nobody asked for a dashboard.

The ranking is now the order of the Building column on the roadmap. We will redo this exercise every quarter and publish the raw tally with it.

Commits
0
PRs
3
People
17
Week 29
enginev0.7.2-alpha

OPFS writes 3.1× faster

Moving the browser database to a dedicated worker with synchronous access handles cut median write time from 1.3 ms to 0.42 ms in Chrome.

Safari support for synchronous access handles landed just in time. Firefox still takes the slower path, and the build log will say when that changes.

  • Dedicated worker for the browser store
  • Write p50 in Chrome: 1.3 ms → 0.42 ms
Commits
58
PRs
9
People
6
Week 27
rfcRFC 0007

RFC 0007: the schema is the API

A proposal to generate typed clients, permissions and sync scopes from one schema file, and to drop the hand-written route layer entirely.

The RFC was open for three weeks and collected 140 comments. It was accepted with two changes: migrations stay explicit, and generated code is checked in rather than built on the fly.

Commits
0
PRs
1
People
23
Week 24
releasev0.6.0-alpha

React hooks, and our first outside pull request

useQuery and useMutation ship with fine-grained subscriptions. The hooks were started by a contributor we had never met.

The first draft came in as a pull request from outside the team. We merged it after four rounds of review and asked its author to own the package.

  • useQuery re-renders only when selected columns change
  • Suspense support behind a flag
Commits
64
PRs
11
People
7
Week 20
devlog

Losing a benchmark in public

We promised to publish the numbers we lose. Cold start on a fresh install is 2.3× slower than a plain REST app, and here is why.

A brand-new client has no local data, so the first screen waits for an initial sync. We are trading a slower first launch for every launch after it being instant, and we think that is the right trade, but you should see the number.

  • Benchmark scripts published in bench/cold-start
Commits
22
PRs
4
People
3