|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Request-system router: RequestGateway accepts client requests (binary/HTTP/WebSocket), load-balances them across RequestExecutors and routes replies back; includes a call log and an embedded web server. More...
#include "Stats.h"#include "NetworkManager.h"#include "RequestExecutor.h"#include "RequestClient.h"Go to the source code of this file.
Classes | |
| class | cmlabs::CallLogEntry |
| One entry of the gateway's call log: who called what, how it was routed, how long each stage took, and the outcome. More... | |
| class | cmlabs::RequestGateway |
| The request-fabric router/load-balancer (see the file header for the full role description). More... | |
Namespaces | |
| namespace | cmlabs |
Functions | |
| THREAD_RET THREAD_FUNCTION_CALL | cmlabs::RequestGatewayExecRun (THREAD_ARG arg) |
| Thread entry point for the gateway's executor-side loop. | |
| THREAD_RET THREAD_FUNCTION_CALL | cmlabs::RequestGatewayClientRun (THREAD_ARG arg) |
| Thread entry point for the gateway's client-side loop. | |
Request-system router: RequestGateway accepts client requests (binary/HTTP/WebSocket), load-balances them across RequestExecutors and routes replies back; includes a call log and an embedded web server.
The gateway is the hub of the request fabric (see RequestClient.h for the conceptual overview and a round-trip example). One process typically runs one RequestGateway listening on one or more ports (addPort()); clients and executors connect in to it (a gateway may additionally link to other gateways via addGateway(), but it never dials out to clients or executors), which simplifies firewalling.
Responsibilities:
A minimal gateway serving binary clients, web traffic and executors on one port looks like this:
Definition in file RequestGateway.h.