GRpcAgentFileStreamServiceImpl (genie 4.1.1 API)

AgentFileStreamService gRPC implementation.
Receives and caches manifests from connected agents.
Allows requesting a file, which is returned in the form of a AgentFileResource.

Implementation overview:
Each agent maintains a single “control” bidirectional stream (through the ‘sync’ RPC method).
This stream is used by the agent to regularly push manifests.
And it is used by the server to request files.

When a file is requested, the agent opens a separate “transfer” bidirectional stream (through the ‘transmit’ RPC
method) for that file transfer and starts sending chunks (currently one at the time), the server sends
acknowledgements in the same stream.

This service returns a resource immediately, but maintains a handle on a buffer where data is written as it is
received.

Read more here: Source link