Skip to content

Asobu 0.1.7

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Aug 02:54
Show friend requests as they arrive, instead of a minute later

The list polled once a minute, so a request sent to somebody sitting on the
friends page took up to sixty seconds to appear. Reopening the drawer forced a
fetch, which is why it looked like nothing arrived until you did.

The server now holds a watch request open until something changes, and every
change wakes every watcher at once by closing a channel they are all waiting on.
Measured against a running instance: a request reaches the other side nine
milliseconds after it is sent, against sixty seconds before. A quiet spell ends
after twenty seconds and is asked again, which doubles as the heartbeat that
keeps presence fresh, so nothing is left running on a timer.

Presence deliberately does not wake watchers, except when somebody comes back
from being offline. A launcher left open all day would otherwise wake everyone
once a minute to tell them nothing.

A watch waits only while the caller is exactly up to date. Behind means there is
news now; ahead means this server restarted and began counting again, and
waiting there would leave a launcher holding a number this server will not reach
for hours.

Verified through Caddy as well as against the backend directly, since a request
held open for twenty seconds is the sort of thing a proxy decides to have
opinions about.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>