Skip to content

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

  1. Connect to server via WebSocket with Authorization: Bearer <jwt> header
  2. Send sentinel.register as the first message with PIN code (1337-4200)
  3. Receive server.registration.ack or server.registration.reject
    • If rejected due to invalid PIN, the reason will be “Invalid PIN”
  4. If accepted: receive server.set-resolution when the server updates the capture resolution
  5. Send sentinel.frame every couple of seconds
  6. Connection closes when the sentinel shuts down

Sequence Diagram


Proctor Lifecycle

Flow

  1. Connect to server via WebSocket with Authorization: Bearer <jwt> header
  2. Send proctor.register as the first message
  3. Receive server.registration.ack or server.registration.reject
  4. If accepted:
    • Send proctor.set-pin to specify which PIN’s sentinels to monitor (1337-4200)
    • Receive server.update-sentinels with the list of available sentinels for that PIN
    • Send proctor.subscribe or proctor.revoke-subscription as needed
    • Send proctor.set-profile to request HIGH, MEDIUM, or LOW
    • Receive server.frame for subscribed sentinels
  5. 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.