RedPepper Documentation

Communucation Protocol

This document describes the protocol used for communication between the Manager and Agents.

Message Transport

The protocol uses a simple bidirectional message transport. This is intended to be somewhat generic and could be replaced with a different message transport if needed (e.g. WebSockets, message queues, etc.).

The default message transport is implemented using TLS-encrypted TCP sockets. Messages are passed back and forth as binary blobs prefixed with the message’s 32-bit encoded length.

Message Encoding

Messages are encoded as MessagePack dicts with a type field which determines both the semantics and the accepted message schema. See messages.py for the schema definitions.

Message Types

AgentHello and ManagerHello messages are used for initial connection setup.

Ping and Pong messages are used for connection keep-alive.

Request and Response messages are used for asynchronous request/response communication.

Notification messages are used for notifications which do not require a response.

Bye messages are used to close the connection gracefully.

Communication Flow

On startup (agent):

On connection received (manager):

Periodically:

Receive Request:

Receive Response:

Receive Notification:

Receive Bye: