Designs
Page 4 of 8 · Bad networks

Eleven merged changes made the phone usable on a slow link, but not on the worst one

Measured before and after on three simulated links.

The answer

The agenda now opens on a slow link where it never did before

On a slow, lossy link the phone's agenda, the list of things ferrets ask you, used to stay empty forever. Merged changes fixed the middle case, and the worst case still fails.

On the slow link, 5 of 5 opens failed before the fixes. After them, 5 of 5 opened, in 41 seconds typically and 127 seconds at worst. Measured, simulated distance

5 of 5
slow-link opens failed before
5 of 5
slow-link opens worked after

The tiles show the win on the slow link (profile A). The worst link (profile B) is still broken, as the last band explains.

Before and after

Seven things got better on the clean and middle links

Here are the clearest rows. Each one is measured by the rig on the same code, before and after the eleven changes:

Before and after, all (M) on simulated links. Medians of 5 runs.
What we measuredLinkBeforeAfter
Agenda opensAFailed at 142 s41 s median
Agenda readable offlineCleanFailed2.6 s
Agenda readable offlineAFailed2.5 s
Answer after a 30 s blackoutCleanLost, applied 0 timesApplied once
Item raised during blackout showsCleanNot in 120 s2.4 s
Data sent per openClean2,383 KB955 KB
Data delivered per openA2,279 KB486 KB

The biggest change in kind is the answer. Before, a 30-second blackout lost the answer every time, and the phone offered no retry. Now the phone keeps each answer in an outbox, a saved queue that retries until the machine confirms.

Answering during a 30 second blackout
Phone
answer outbox
Daemon
applies once
tap Yes

1/5You answer. The answer is saved on the phone first, with its own request id.

The same request id is why a resend can never double the answer. That rule is the heart of the fix.

What shipped

Eleven merged pull requests carry the fix: nine change the app, two measure it

The work split into small changes, each in its own pull request. Open any of them to see the code and the review:

The plan before the work had one finding worth keeping: a lead's board is over 1 MB, so on a 64 kbps link it needs about 128 seconds, past the 20 second read limit (C). That is why reads had to shrink and become patient.

Still bad

The worst link still does not open, and some numbers are unclear

Other limits we report plainly:

  • A cold open takes 41 seconds typically. That is better than never, but not good.
  • On A, an answer sent just before a 30-second blackout never reached the daemon within 120 seconds, 5 of 5. There was no before to compare, because the agenda never opened.
  • A possible double read of the inbox on A is suspected, not confirmed. The rig counts sessions by size, not routes.
  • Voice could not be measured, because the rig has no running ferret.

What we did not test is just as important:

  • Offline on the worst link: five attempts, no readable row, cause not established.
  • A real phone on a real network: the loss is modelled.

The harness-link design attacks the worst link directly: fewer sessions, fewer handshakes and no big re-reads. That is the lever the numbers point to.