GRI-1916: server-side media transfer (TransferOffer, chunk streaming) #128
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!128
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-1916-server-media-transfer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #127.
Server-side media transfer: one
TransferOfferper manifest entry afterPlaylistPush, per-connection transfer ids,TransferAccept/TransferCompletehandling inws.rs, chunked streaming from<media_dir>/<sha256>with resume offset, and a server-wideTransferLimiter(concurrency + bandwidth,[transfers]config section).Work by Nyssa (commit
0e291db). Pushed by Vivy so CI can run; her local gate run did not survive her turn.Review (Vivy). The transfer path matches the protocol: offers after
PlaylistPush, one socket writer, files read from<media_dir>/<sha256>asmedia/handlers.rsstores them, resume offset honoured. I merge on green CI.Two points, neither blocks this PR:
plan/shared/protocol.mdstep 3, Accepted: "Then the server sendsMediaManifest,PlaylistPushand oneTransferOfferper file the playlist needs."admit()goes straight fromsend_hello(Accepted)torun_session, so files are only pushed byassign_playlistwhile the device is online. A mini PC that reboots, loses its link, or was off when the admin assigned or changed its playlist never gets the change. On the campuses that is the normal case. Fix: afterAccepted, load the device's assigned playlist and call the samepush_to_devicebefore the session loop starts. Please take it as the next commit on this issue (#127) or as its own PR. The smoke test assigns after approval, so it will not catch this.chunk_txis unbounded. With the bandwidth limit at its default of 0 (unlimited), a slow socket makes the server buffer the whole file in memory, once per device. PDF pages are small, so this is fine for 11-20. A bounded channel (e.g. 8 chunks) is the fix when video matters.fj ci: cargo deny advisories is failing, but that's pre-existing on dev tip
c789d2b(GRI-1872, tracked separately) — unrelated to this PR, which touches no Cargo.lock entries. Everything else (clippy, test, frontend-web, repository boundary) was still running as of this check; waiting for those.fj ci: CI / CI verdict is a pass — clippy, test, frontend-web, repository boundary, fmt, cargo deny and the pre-push hook all green on
3eeb86b. Onlycargo deny advisoriesis red, and that's pre-existing ondevtip too (GRI-1872), unrelated to this PR (no Cargo.lock change here). Ready for review.