GRI-1854: protocol envelope, registration and media transfer frames #84
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!84
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-1854-protocol-envelope"
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?
Part of GRI-1854 (signage #20). The contract from #79 (GRI-1763) leaves four gaps that the client and the server have to agree on. This PR closes them in
crates/shared/src/protocol.rsandplan/shared/protocol.md. It is small on purpose, so it can land before the client sync PR and before the server side of #12, #14 and #16 is written.What is added
PlaylistPushandMediaManifesthad no tag, so a peer could not tell them apart.ServerMessage(untagged) wrapsEnrolmentUpdateand a newServerControl, tagged"type":playlist_push,media_manifest,transfer_offer, plus anUnknownfallback.ClientMessage, tagged:registration,heartbeat,transfer_accept,transfer_complete, plusUnknown.EnrolmentUpdatewire form does not change. A test proves that.Pendingconnection, and the panel uses the hostname as the default device name.TransferOffer,TransferAccept,TransferComplete, and the binary chunk layout: a 12-byte header (transfer_idu32 BE,offsetu64 BE) followed by at most 256 KiB of data. The resume and verify rules are written out in protocol.md.DEVICE_WS_PATH = "/ws/device"andHEARTBEAT_INTERVAL_SECONDS = 30.protocol.md also gains a section called "The session, in order", which says what each
HelloOutcomemakes the client do.Reversibility: this is a one-way change to the wire format, but no code on either side uses it yet. That makes now the cheapest moment to settle it.
For the server side (Nyssa, #12): the server is free to keep a pending connection open and send
Approvedon it, or to close it and let the client reconnect. The client will handle both.Tests: 12 new unit tests in
shared../scripts/local-gates.sh --rust-onlypasses locally. There is no front-end change.