RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Classes | Public Member Functions | Public Attributes
RTBKIT::AgentConfigurationService Struct Reference

#include <agent_configuration_service.h>

Inheritance diagram for RTBKIT::AgentConfigurationService:
Datacratic::RestServiceEndpoint Datacratic::ServiceBase RTBKIT::MonitorProvider Datacratic::MessageLoop Datacratic::EventRecorder Datacratic::Epoller Datacratic::AsyncEventSource

List of all members.

Classes

struct  AgentInfo
struct  ListenerInfo

Public Member Functions

 AgentConfigurationService (std::shared_ptr< ServiceProxies > services, const std::string &serviceName="agentConfigurationService")
void init ()
void start ()
void shutdown ()
void handleAgentHeartbeat (const std::string &agent)
 Handler for POST /v1/agents/<name>/heartbeat.
void handleAgentConfig (const std::string &agent, const Json::Value &config)
 Handler for POST /v1/agents/<name>/.
Json::Value handleGetAgent (const std::string &agent) const
 Handler for GET /v1/agents/<name>/.
std::vector< std::string > handleGetAgentList () const
 Handler for GET /v1/agents/.
Json::Value handleGetAllAgents () const
 Handler for GET /v1/agents/all.
void bindTcp ()
 Bind to tcp/ip ports and listen.
std::string getProviderName () const
Json::Value getProviderIndicators () const

Public Attributes

RestRequestRouter router
ZmqNamedClientBus agents
ZmqNamedClientBus listeners
std::unordered_map
< std::string, ListenerInfo
listenerInfo
std::unordered_map
< std::string, AgentInfo
agentInfo
MonitorProviderClient monitorProviderClient

Detailed Description

Service that maintains and broadcasts the bidding agent configuration to all services that are listening for it.

AGENTS send (via a REST interface) their configuration on startup and every time it changes. They also send a heartbeat every second to say that they are still alive.

SERVICES (router, post auction loop, and anything that needs to know how the agents are configured) connect via zeromq. They will be sent all configurations on connection, and will be sent any changed configurations once they are changed.

Definition at line 35 of file agent_configuration_service.h.


Member Function Documentation

MonitorProvider interface

Implements RTBKIT::MonitorProvider.

Definition at line 240 of file agent_configuration_service.cc.


Member Data Documentation

Services connect via a zeromq bus as they need to be pushed notifications of changes.

Definition at line 93 of file agent_configuration_service.h.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator