Skip to content

feat: Add orchestration server — REST/WebSocket gateway and C++ agent gRPC client#32

Open
kox13 wants to merge 23 commits into
develfrom
feat/grpc-communication
Open

feat: Add orchestration server — REST/WebSocket gateway and C++ agent gRPC client#32
kox13 wants to merge 23 commits into
develfrom
feat/grpc-communication

Conversation

@kox13

@kox13 kox13 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #7

This pull request implements the communication layer between the dashboard
and C++ agents. A Go server acts as a gateway — exposing REST and WebSocket
endpoints to the dashboard, while communicating with agents over gRPC.
The C++ agent gains a gRPC client stub to connect to the server and stream
metrics in response to received messages.

gRPC agent gateway (Go server)

  • Added a GET /api/agents REST endpoint that lists all connected agents and their status
  • Added a POST /api/agents/{id}/stream REST endpoint that dispatches a streaming task to a specific agent over a gRPC stream.
  • Added a /ws?agent_id={id} WebSocket endpoint that forwards incoming metric frames from the agent to the connected dashboard clients. WebSocket connections are per-agent — the dashboard subscribes to a specific agent's stream.
  • Implemented a gRPC server that receives metric streams from agents and routes them to the appropriate active WebSocket connection. Metric streaming starts on task dispatch, not on connection.

gRPC client (C++ agent)

  • Added a gRPC client implementation in the agent that connects to the server on startup and opens a bidirectional stream.
  • On receiving a task from the server, the agent begins collecting and streaming metrics back through the open gRPC stream.
  • Proto definitions were extended to cover task dispatch and metric stream message types shared between Go and C++.

These changes introduce a complete request/response + streaming pipeline between the dashboard and agents, laying the foundation for real-time metric observability.

kox13 added 22 commits February 3, 2026 21:04
…ithub actions ci, modified pre-commit script to check server code formatting
…move PrintCurrentAffinity to utils, move UUID saving and loading to Client, remove UUID creation from the agent
…ints; default CMake preset is now Debug build type
@kox13 kox13 self-assigned this Jun 9, 2026
@kox13 kox13 added this to volta Jun 9, 2026
@kox13 kox13 added the enhancement New feature or request label Jun 9, 2026
@patryk-przybysz patryk-przybysz changed the base branch from main to devel June 10, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Agent] Implement transport layer (scaffolding, gRPC client)

2 participants