Goal
Implement a Server Lite Mode that accepts agent metric batches over existing gRPC ingest and immediately broadcasts normalized live updates to connected dashboard clients over WebSocket.
Scope of work
- Keep gRPC ingest endpoint compatible with current protocol.
- Validate incoming batches using existing core invariants:
len(timestamps) == len(values)
- strictly increasing timestamps per
TimeSeries
- metric name format and basic batch limits.
- Track latest in-memory state per agent/metric needed for live dashboard.
- Expose WebSocket endpoint for live stream broadcast to UI clients.
- Broadcast events to all subscribed clients with minimal transformation (agent id, metric name, labels, timestamp, value).
- Handle disconnect/reconnect gracefully for both agents and WS clients.
- Add observability hooks/logging for ingest throughput, connected WS clients, and dropped/invalid messages.
Acceptance criteria
- Agent can complete handshake and stream metric batches to server.
- Server responds with ack and correct sequence numbers.
- Invalid batches are rejected/logged and do not crash the process.
- At least one WS client can connect and receive live metric updates within acceptable real-time delay.
- Multiple concurrent WS clients receive the same stream reliably.
- When no WS clients are connected, ingest remains stable (no blocking/backpressure failure).
- Basic tests cover:
- gRPC ingest,
- WS broadcast,
- validation failures.
Deliverables
- Ingest-to-broadcast pipeline implementation.
- WebSocket live endpoint contract and message schema documentation.
- Unit/integration tests.
- Update to server README/docs with:
- how to run the server,
- endpoint list,
- known limitations (no persistence/history).
Goal
Implement a Server Lite Mode that accepts agent metric batches over existing gRPC ingest and immediately broadcasts normalized live updates to connected dashboard clients over WebSocket.
Scope of work
len(timestamps) == len(values)TimeSeriesAcceptance criteria
Deliverables