Client sync: wss connection, enrolment, playlist and media download #20

Closed
opened 2026-11-07 18:57:57 +00:00 by vivy · 2 comments
Owner

What

Client connects over wss://, enrols, receives its playlist, downloads media into the cache, reconnects with backoff.

Done when

The client survives a server restart and picks up a playlist change.

Depends on

#12, #16, #17, #18

Plan

plan/client/README.md, plan/shared/protocol.md

Status

Planned for Nyssa (plan unit 5).


Routing/Hold: no agent is routed to this issue automatically. To take it yourself, assign yourself. Vivy removes the hold when it is handed to an agent.
Created for GRI-1818 from plan/overview/roadmap.md and the MVP plan on GRI-1761.

## What Client connects over wss://, enrols, receives its playlist, downloads media into the cache, reconnects with backoff. ## Done when The client survives a server restart and picks up a playlist change. ## Depends on #12, #16, #17, #18 ## Plan plan/client/README.md, plan/shared/protocol.md ## Status Planned for Nyssa (plan unit 5). --- `Routing/Hold`: no agent is routed to this issue automatically. To take it yourself, assign yourself. Vivy removes the hold when it is handed to an agent. Created for GRI-1818 from `plan/overview/roadmap.md` and the MVP plan on GRI-1761.
Member

Implemented in PR #86 (client), stacked on PR #84 (protocol envelope and transfer frames, which closes contract gaps the server side also needs).

The done-when is covered by a test: crates/client/tests/sync_survives_restart.rs. A fake server enrols the client, sends playlist v1 and one file in chunks, then goes away. A new server on the same port gets the client back with its permanent identity, and the client picks up playlist v2 without re-downloading the cached file.

The server side of #12, #14 and #16 should build against #84: /ws/device, ServerMessage/ClientMessage, Registration, and the 12-byte chunk header. Local Rust gates are green. Forge CI is queued.

Next: #21 (playback from the cache), in this order: web page and PDF pages first, then image, then video, per the product owner.

Implemented in PR #86 (client), stacked on PR #84 (protocol envelope and transfer frames, which closes contract gaps the server side also needs). The done-when is covered by a test: `crates/client/tests/sync_survives_restart.rs`. A fake server enrols the client, sends playlist v1 and one file in chunks, then goes away. A new server on the same port gets the client back with its permanent identity, and the client picks up playlist v2 without re-downloading the cached file. The server side of #12, #14 and #16 should build against #84: `/ws/device`, `ServerMessage`/`ClientMessage`, `Registration`, and the 12-byte chunk header. Local Rust gates are green. Forge CI is queued. Next: #21 (playback from the cache), in this order: web page and PDF pages first, then image, then video, per the product owner.
Member

Done: in dev through #84 (b5484cb0, protocol envelope, /ws/device, transfer frames) and #86 (3cc3199, client sync). Done-when test: tests/sync_survives_restart.rs. A fake server restarts on the same port, and the client reconnects with its stored identity and picks up playlist v2. Residual risk: the server side of the media transfer does not exist yet, so the client has only been tested against a fake server.

Done: in dev through #84 (b5484cb0, protocol envelope, /ws/device, transfer frames) and #86 (3cc3199, client sync). Done-when test: tests/sync_survives_restart.rs. A fake server restarts on the same port, and the client reconnects with its stored identity and picks up playlist v2. Residual risk: the server side of the media transfer does not exist yet, so the client has only been tested against a fake server.
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage#20
No description provided.