Lifecycle
This document describes the lifecycle of WebSocket connections for both Sentinels and Proctors.
- Sentinel: Frame producer (runs on student machines)
- Proctor: Frame consumer (teacher interface)
Sentinel Lifecycle
Flow
- Connect to server via WebSocket with
Authorization: Bearer <jwt>header - Send
sentinel.registeras the first message with PIN code (1337-4200) - Receive
server.registration.ackorserver.registration.reject- If rejected due to invalid PIN, the reason will be “Invalid PIN”
- If accepted: receive
server.set-resolutionwhen the server updates the capture resolution - Send
sentinel.frameevery couple of seconds - Connection closes when the sentinel shuts down
Sequence Diagram
Proctor Lifecycle
Flow
- Connect to server via WebSocket with
Authorization: Bearer <jwt>header - Send
proctor.registeras the first message - Receive
server.registration.ackorserver.registration.reject - If accepted:
- Send
proctor.set-pinto specify which PIN’s sentinels to monitor (1337-4200) - Receive
server.update-sentinelswith the list of available sentinels for that PIN - Send
proctor.subscribeorproctor.revoke-subscriptionas needed - Send
proctor.set-profileto requestHIGH,MEDIUM, orLOW - Receive
server.framefor subscribed sentinels
- Send
- Connection closes when the proctor shuts down
Sentinel Updates
The server sends server.update-sentinels to the proctor:
- Immediately after successful registration
- Whenever a sentinel connects or disconnects
- When the Proctor updates their pin
Sequence Diagram
Last updated on • J.H.F.