diff options
| author | eunhhu <[email protected]> | 2026-09-26 22:56:47 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-26 22:56:47 +0100 |
| commit | a51232af741cb952d7deb72f238c583919ababc0 (patch) | |
| tree | 43b250cb0d76460fb447461e878cce0a65aefc41 /prototypes/connections/test-async.c | |
| parent | ea631f980a029141cd0b4835f35b27cd487ff3ea (diff) | |
| download | pure-a51232af741cb952d7deb72f238c583919ababc0.tar.gz pure-a51232af741cb952d7deb72f238c583919ababc0.zip | |
Show views from the last save's snapshot on connection threads (080)
The owner publishes a snapshot of the saved states after every save,
before it hands back the answers; connection threads take the newest
one each round and show views from it with a reader app of their own.
A read made after a write's answer sees the write, nothing unsaved or
undone is ever shown, and reads no longer wait while the owner applies
events or syncs. Apps with states always get an owner thread, even
with one connection thread. A round's inputs go to the owner first;
its views are shown and then answered together (answering each one as
it was shown made one thread's 20-row page 8% slower).
On the Pi 5, with 8 connections posting durable scores and 56 reading
the total, reads went from 10-16k/s at p99 13-29 ms to 107-149k/s at
p99 0.6-0.7 ms, and posts stayed in range; axum and drogon, which sync
under their lock, read 1.1-1.3k/s at p99 111-156 ms. A snapshot of a
changed 1,024-item list costs 1.2 us (65,536 items: 87 us) against a
3-4 ms save.
Diffstat (limited to 'prototypes/connections/test-async.c')
0 files changed, 0 insertions, 0 deletions
