ReCodEx - Task Broker
ReCodEx is complex programmer testing solution, primary targeted to technical universities. It's highly customizable and based on modern technologies.
|
#include <broker_connect.h>
Public Member Functions | |
broker_connect (std::shared_ptr< const broker_config > config, std::shared_ptr< zmq::context_t > context, std::shared_ptr< worker_registry > router, std::shared_ptr< spdlog::logger > logger=nullptr) | |
void | start_brokering () |
Static Public Attributes | |
static const std::string | KEY_WORKERS = "workers" |
static const std::string | KEY_CLIENTS = "clients" |
static const std::string | KEY_MONITOR = "monitor" |
static const std::string | KEY_STATUS_NOTIFIER = "status_notifier" |
static const std::string | KEY_TIMER = "timer" |
static const std::string | MONITOR_IDENTITY = "recodex-monitor" |
Receives requests from clients and forwards them to correct workers.
Definition at line 21 of file broker_connect.h.
broker_connect::broker_connect | ( | std::shared_ptr< const broker_config > | config, |
std::shared_ptr< zmq::context_t > | context, | ||
std::shared_ptr< worker_registry > | router, | ||
std::shared_ptr< spdlog::logger > | logger = nullptr |
||
) |
config | a configuration object used to set up the connections |
context | ZeroMQ context |
router | A registry used to track workers and their jobs |
logger |
Definition at line 13 of file broker_connect.cpp.
void broker_connect::start_brokering | ( | ) |
Bind to sockets and start receiving and routing requests. Blocks execution until the underlying ZeroMQ context is terminated.
Definition at line 43 of file broker_connect.cpp.
|
static |
A string key for the socket connected to the clients
Definition at line 38 of file broker_connect.h.
|
static |
A string key for the socket connected to the monitor
Definition at line 41 of file broker_connect.h.
|
static |
A string key for messages for the status notifier
Definition at line 44 of file broker_connect.h.
|
static |
A string key for messages about time elapsed in the poll loop
Definition at line 47 of file broker_connect.h.
|
static |
A string key for the socket connected to the workers
Definition at line 35 of file broker_connect.h.
|
static |
Identity of the monitor peer (necessary when working with router sockets)
Definition at line 50 of file broker_connect.h.