Somebody marks something watched on a train. Either that is remembered or it is
not, and if it is not, then the offline behaviour was decoration. This queue is
also what the playback positions in M6 ride on, so it is built once here.
What this produces
A durable queue of actions taken while the server was unreachable, surviving a
restart, since a train journey usually includes closing the application.
An ordering rule and a rule for two actions that touch the same thing, because
the last one usually wins and the record says so explicitly rather than leaving
it to the order the queue happened to drain in.
Delivery that is safe to repeat, so that an action sent twice after a flaky
reconnection does not count twice.
A bound on the queue, and a stated rule for what happens when it is full, which
is a real case on a device left offline for a month.
A named report of what could not be delivered, since silently discarding a
person's action is the failure this whole issue exists to prevent.
Done when
A test queues actions offline, restarts the core, restores the server and
proves every action arrived exactly once and in the stated order. A test fills
the queue past its bound and proves the stated rule. Blocked on #40, #45, and
#102 for the clock a queued action's wait is measured against. What a
half-written queue entry may do is #105 rather than this issue.
Somebody marks something watched on a train. Either that is remembered or it is
not, and if it is not, then the offline behaviour was decoration. This queue is
also what the playback positions in M6 ride on, so it is built once here.
What this produces
A durable queue of actions taken while the server was unreachable, surviving a
restart, since a train journey usually includes closing the application.
An ordering rule and a rule for two actions that touch the same thing, because
the last one usually wins and the record says so explicitly rather than leaving
it to the order the queue happened to drain in.
Delivery that is safe to repeat, so that an action sent twice after a flaky
reconnection does not count twice.
A bound on the queue, and a stated rule for what happens when it is full, which
is a real case on a device left offline for a month.
A named report of what could not be delivered, since silently discarding a
person's action is the failure this whole issue exists to prevent.
Done when
A test queues actions offline, restarts the core, restores the server and
proves every action arrived exactly once and in the stated order. A test fills
the queue past its bound and proves the stated rule. Blocked on #40, #45, and
#102 for the clock a queued action's wait is measured against. What a
half-written queue entry may do is #105 rather than this issue.