hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HCE::handlers::DataServerProxy Class Reference

#include <DataServerProxy.hpp>

Inheritance diagram for HCE::handlers::DataServerProxy:
Collaboration diagram for HCE::handlers::DataServerProxy:

Public Member Functions

 DataServerProxy (std::string name, zmq::context_t &ctx, const std::string &clientIdentity, std::string connectionString, unsigned char nodeMode, int64_t startedAt, unsigned char logPriority, const std::string &iniFile="")
 ~DataServerProxy ()
- Public Member Functions inherited from HCE::handlers::Handler
 Handler (const std::string &name, zmq::context_t &context, const std::string &clientIdentity, const std::string &connectionString, int64_t startedAt, unsigned char logPriority, const std::string &iniFile="")
virtual ~Handler ()
void shutdown (void)
 Get handler instance name.
std::string getName (void)

Protected Types

enum  EmptyResponseType

Protected Member Functions

int initialize (void)
void deinitialize (void)
void * process (void)
void handleInternalMessage (void)
void handleExternalMessage (void)
std::string processAdminCommands (std::string &command, std::string &parameters)
 Get property information.
void logPeriodicStatistics (void)
void heartbit (void)
void sendHeartbeat (const std::string &identity)
void registerClient (const std::string &identity)
 Admin socket.
void processControlMessage (zmsg &msg)
void processDataMessage (zmsg &msg)
 Get property information.
std::string getPropertyInformation (void)
 Send periodical property values.
std::string makeEmptyResponseMessage (const std::string &messageBody, EmptyResponseType responseType, const std::string &messageRoute, const std::string &errorMsg="")
 Send empty response message to reducer.
void sendEmptyResponseMessage (zmsg &msg, const std::string &coverMessageBody, EmptyResponseType responseType, const std::string &messageId, const std::string &messageRoute, const std::string &errorMsg="")
 Make and send response message.
void sendResponseMessage (const std::string &identity, const std::string &messageId, const std::string &messageBody, const std::string &messageRoute)
 Node initialization from ini file.
void nodeInit (const std::string &iniFile)
 Check initialization and set default value if necessary.
void checkInit (void)
 ZMQ Sockets.
size_t getRandomNodeNumber (size_t maxNumber)
 Get identity use random algorithm.
std::string getIdentityRandom (std::vector< ClientWorkerItem > &clients, size_t &previousClientNumber)
 Get identity use resource usage algorithm.
std::string getIdentityResourceUsage (std::vector< ClientWorkerItem > &clients, size_t &previousClientNumber, CalculatorAlgorithm::Types typeAlgorithm, const CalculatorAlgorithmData &algorithmData)
 Algorithm data for balancing calculator.
void setNodeMode (unsigned char nodeMode)
unsigned char getNodeMode (void)
 Resource usage algorithm.
void setResourcesUsageAlg (unsigned int resourcesUsageAlg)
unsigned int getResourcesUsageAlg (void)
 Resource usage alg0 weights (default algorithm)
void setResourcesUsageAlg0Weights (const std::string &resourcesUsageAlg0Weights)
std::string getResourcesUsageAlg0Weights (void)
 Resource usage order.
void setResourcesUsageOrder (unsigned int resourcesUsageOrder)
unsigned int getResourcesUsageOrder (void)
 Resource usage limits.
void setResourcesUsageLimits (const std::string &resourcesUsageLimits)
std::string getResourcesUsageLimits (void)
 Resource usage collected size.
void setResourcesUsageCollectedSize (unsigned int resourcesUsageCollectedSize)
unsigned int getResourcesUsageCollectedSize (void)
 Resource usage max allowed range for calculation of weight in percent.
void setResourcesUsageMaxAllowedRange (double resourcesUsageMaxAllowedRange)
double getResourcesUsageMaxAllowedRange (void)
 DRCE resources extractor max threads.
void setResourcesExtractorMaxThreads (unsigned int resourcesExtractorMaxThreads)
unsigned int getResourcesExtractorMaxThreads (void)
 DRCE resources extractor max processes.
void setResourcesExtractorMaxProcesses (unsigned int resourcesExtractorMaxProcesses)
unsigned int getResourcesExtractorMaxProcesses (void)
 DRCE resources extractor max disk size.
void setResourcesExtractorMaxDiskSize (unsigned int resourcesExtractorMaxDiskSize)
unsigned int getResourcesExtractorMaxDiskSize (void)
 DRCE resources extractor max vram size.
void setResourcesExtractorMaxVramSize (unsigned int resourcesExtractorMaxVramSize)
unsigned int getResourcesExtractorMaxVramSize (void)
 DRCE resources extractor max rram size.
void setResourcesExtractorMaxRramSize (unsigned int resourcesExtractorMaxRramSize)
unsigned int getResourcesExtractorMaxRramSize (void)
 Setters and getters for stat variables.
void setStatClientRequests (unsigned int statClientRequests)
unsigned int getStatClientRequests (void)
void setStatClientResponses (unsigned int statClientResponses)
unsigned int getStatClientResponses (void)
void setStatRequests (unsigned int statRequests)
unsigned int getStatRequests (void)
void setStatClientRequestsSize (unsigned int statRequestsSize)
unsigned int getStatClientRequestsSize (void)
void setStatClientResponsesSize (unsigned int statResponsesSize)
unsigned int getStatClientResponsesSize (void)
void setStatRequestsSize (unsigned int statRequestsSize)
unsigned int getStatRequestsSize (void)
void setPeriodicStatClientRequests (unsigned int periodicStatClientRequests)
unsigned int getPeriodicStatClientRequests (void)
void setPeriodicStatClientResponses (unsigned int periodicStatClientResponses)
unsigned int getPeriodicStatClientResponses (void)
void setStatRequestsProcessed (unsigned int statRequestsProcessed)
unsigned int getStatRequestsProcessed (void)
void setStatRequestsProcessedSize (unsigned int statRequestsProcessedSize)
unsigned int getStatRequestsProcessedSize (void)
void setPeriodicStatClientRequestsSize (unsigned int periodicStatClientRequestsSize)
unsigned int getPeriodicStatClientRequestsSize (void)
void setPeriodicStatClientResponsesSize (unsigned int periodicStatClientResponsesSize)
unsigned int getPeriodicStatClientResponsesSize (void)
void setStatQPSClient (float statQPSClient)
float getStatQPSClient (void)
void setStatQPSServer (float statQPSServer)
float getStatQPSServer (void)
void setStatRPSClient (float statRPSClient)
float getStatRPSClient (void)
void setStatRPSServer (float statRPSServer)
float getStatRPSServer (void)
void setStatRequestsBandwidthClient (float statRequestsBandwidthClient)
float getStatRequestsBandwidthClient (void)
void setStatRequestsBandwidthServer (float statRequestsBandwidthServer)
float getStatRequestsBandwidthServer (void)
void setStatResponsesBandwidthClient (float statResponsesBandwidthClient)
float getStatResponsesBandwidthClient (void)
void setStatResponsesBandwidthServer (float statResponsesBandwidthServer)
float getStatResponsesBandwidthServer (void)
 Send out periodical stats at regular intervals.
- Protected Member Functions inherited from HCE::handlers::Handler
void setName (const std::string &name)
 <Set handler instance name
void setClientIdentity (const std::string &clientIdentity)
 Get client ID.
std::string getClientIdentity (void)
 Set start time mark.
void setStartedAt (int64_t startedAt)
 Get start time mark.
int64_t getStartedAt (void)
 Set log priority level.
void setLogPriority (unsigned int logPriority)
 Get log priority level.
unsigned int getLogPriority (void)
 Set ini file name.
void setIniFile (const std::string &iniFile)
 Get ini file name.
std::string getIniFile (void)
 Set ZMQ connections rebuild tries max number.
void setBindTriesMaxNumber (const unsigned int &bindTriesMaxNumber)
 Get ZMQ connections rebuild tries max number.
unsigned int getBindTriesMaxNumber (void)
 Set ZMQ connections rebuild tries delay.
void setBindTriesDelay (const unsigned int &bindTriesDelay)
 Get ZMQ connections rebuild tries delay.
unsigned int getBindTriesDelay (void)
 Set ZMQ connection string.
void setConnectionString (const std::string &connectionString)
 Get ZMQ connection string.
std::string getConnectionString (void)
 Set flag for polling condition.
void setInProgress (bool in_progress)
 Get flag for polling condition.
bool getInProgress (void) const
 Set poll timeout value.
void setPollTimeout (unsigned int pollTimeout)
 Get poll timeout value.
unsigned int getPollTimeout (void)
 Set property interval between resend Property values.
void setPropertyInterval (unsigned int propertyInterval)
 Get property interval between resend Property values.
unsigned int getPropertyInterval (void)
 Set interval between dump run-time variables.
void setDumpInterval (unsigned int dumpInterval)
 Get interval between dump run-time variables.
unsigned int getDumpInterval (void)
 Set flag for allowed restore variables use dump.
void setDumpAllowRestore (unsigned int dumpAllowRestore)
 Get interval between dump run-time variables.
unsigned int getDumpAllowRestore (void)
void logFlush (unsigned int priority=NODE_LOG_MODE_DEFAULT)
 Node init from file.
void initHandler (const std::string &iniFile, LoggerStream &logger)
void handleAdminMessage (void)
void processAdminMessage (zmsg &msg)
void rebuildAdminClientSocket (void)
bool rebuildServerConnection (zmq::socket_t *&sock_p, const std::string &connectionString, const int type)
void rebuildClientConnection (zmq::socket_t *&sock_p, const std::string &connectionString, const int type, const std::string &identity="")
bool rebuildClientConnection (zmq::socket_t *&sock_p, const std::string &connectionString, const int type, const std::string &identity, int linger, const std::string &readyMessage="", const std::string &byeMessage=NODE_MSG_BYE)
void sendByeMessage (zmq::socket_t *&sock_p, const std::string &identity="", const std::string &byeMessage=NODE_MSG_BYE)
std::string getProperties (void)
 Get property information.
void sendPeriodicProperties (void)
 Safe create directories if necessary.
void createDirectories (const std::string &name)
 Get file name use for dump and restore properties values.
std::string getDumpFileName (void)
 Get file name use for dump and restore statistic values.
std::string getStatFileName (void)
 Dump properties variables.
bool dumpProperties (void)
 Dump run-time variables at regular intervals.
bool dumpRunTimeVariables (void)
- Protected Member Functions inherited from HCE::handlers::DataNodeOptions
 DataNodeOptions (HandlerProperties &handlerProperties)
virtual ~DataNodeOptions (void)
void initNode (const std::string &iniFile, LoggerStream &logger)
void setHeartbeatDelay (unsigned int heartbeatDelay)
unsigned int getHeartbeatDelay (void)
void setHeartbeatTimeout (unsigned int heartbeatTimeout)
unsigned int getHeartbeatTimeout (void)
void setHeartbeatMode (unsigned int heartbeatMode)
unsigned int getHeartbeatMode (void)

Protected Attributes

zmq::socket_t_inprocProxySock
zmq::socket_t_inprocReducerInSock
zmq::socket_t_dataServerSock
 Previous client number.
size_t _previousClientNumber
 Random client number genertor.
CalculatorAlgorithmData calculatorAlgorithmData
 Resource usage limits data.
ResourceUsageLimitsData resourceUsageLimitsData
 Type of algorithm for balancing calculator.
CalculatorAlgorithm::Types typeCalculatorAlgorithm
 Resource usage manager.
ResourceUsageManager _resourceUsageManager
 Queue of connected clients.
std::vector< ClientWorkerItem_clientsQueue
ClientsQueueManager_clientsManager
 Heartbeat at time mark.
int64_t _heartbeatAt
 Node mode: router, shard manager, replica manager or replica.
int64_t _pstatsAt = s_clock() + HEARTBEAT_DELAY
- Protected Attributes inherited from HCE::handlers::Handler
zmq::socket_t_inprocAdminSock
 Storage for run-time property variables.
HandlerProperties handlerProperties
 Storage for run-time statistic variables.
HandlerProperties statProperties
 ZMQ context.
zmq::context_t_context
std::bitset< 4 > _logMask
std::string _logTimeFormat
std::stringstream log
LoggerStream logger
 Main loop of sockets polling condition.
bool _inProgress
 Send out periodical property values to Admin class at regular intervals.
int64_t _propertyIntervalAt
 Dump run-time variables at regular intervals.
int64_t _dumpIntervalAt
 Dump dir name.
std::string _dumpDir

Additional Inherited Members

- Static Public Member Functions inherited from HCE::handlers::Handler
static void * main (void *that)

Detailed Description

Definition at line 38 of file DataServerProxy.hpp.

Member Enumeration Documentation

Definition at line 65 of file DataServerProxy.hpp.

Constructor & Destructor Documentation

HCE::handlers::DataServerProxy::DataServerProxy ( std::string  name,
zmq::context_t ctx,
const std::string &  clientIdentity,
std::string  connectionString,
unsigned char  nodeMode,
int64_t  startedAt,
unsigned char  logPriority,
const std::string &  iniFile = "" 
)

<Init all the rest

Definition at line 25 of file DataServerProxy.cpp.

Here is the call graph for this function:

HCE::handlers::DataServerProxy::~DataServerProxy ( )

Definition at line 37 of file DataServerProxy.cpp.

Here is the call graph for this function:

Member Function Documentation

void HCE::handlers::DataServerProxy::checkInit ( void  )
protected

ZMQ Sockets.

<Check all stat variables

Definition at line 844 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::deinitialize ( void  )
protectedvirtual

Implements HCE::handlers::Handler.

Definition at line 83 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string HCE::handlers::DataServerProxy::getIdentityRandom ( std::vector< ClientWorkerItem > &  clients,
size_t &  previousClientNumber 
)
protected

Get identity use resource usage algorithm.

<Erase previous client

<Sort clients by frequency of queries done

<Save more greater node's identity name

<Save previous client number

Definition at line 617 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string HCE::handlers::DataServerProxy::getIdentityResourceUsage ( std::vector< ClientWorkerItem > &  clients,
size_t &  previousClientNumber,
CalculatorAlgorithm::Types  typeAlgorithm,
const CalculatorAlgorithmData algorithmData 
)
protected

Algorithm data for balancing calculator.

<Calculate average value of resources usage

Definition at line 660 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char HCE::handlers::DataServerProxy::getNodeMode ( void  )
protected

Resource usage algorithm.

Definition at line 107 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getPeriodicStatClientRequests ( void  )
protected

Definition at line 267 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getPeriodicStatClientRequestsSize ( void  )
protected

Definition at line 299 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getPeriodicStatClientResponses ( void  )
protected

Definition at line 275 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getPeriodicStatClientResponsesSize ( void  )
protected

Definition at line 307 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string HCE::handlers::DataServerProxy::getPropertyInformation ( void  )
protectedvirtual

Send periodical property values.

Reimplemented from HCE::handlers::Handler.

Definition at line 1234 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

size_t HCE::handlers::DataServerProxy::getRandomNodeNumber ( size_t  maxNumber)
protected

Get identity use random algorithm.

<Initialize random seed

<Generate index number limited clients queue size

Definition at line 608 of file DataServerProxy.cpp.

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getResourcesExtractorMaxDiskSize ( void  )
protected

DRCE resources extractor max vram size.

Definition at line 192 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getResourcesExtractorMaxProcesses ( void  )
protected

DRCE resources extractor max disk size.

Definition at line 183 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getResourcesExtractorMaxRramSize ( void  )
protected

Setters and getters for stat variables.

Definition at line 210 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getResourcesExtractorMaxThreads ( void  )
protected

DRCE resources extractor max processes.

Definition at line 174 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getResourcesExtractorMaxVramSize ( void  )
protected

DRCE resources extractor max rram size.

Definition at line 201 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getResourcesUsageAlg ( void  )
protected

Resource usage alg0 weights (default algorithm)

Definition at line 116 of file DataServerProxy.cpp.

Here is the call graph for this function:

std::string HCE::handlers::DataServerProxy::getResourcesUsageAlg0Weights ( void  )
protected

Resource usage order.

Definition at line 128 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getResourcesUsageCollectedSize ( void  )
protected

Resource usage max allowed range for calculation of weight in percent.

Definition at line 157 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string HCE::handlers::DataServerProxy::getResourcesUsageLimits ( void  )
protected

Resource usage collected size.

Definition at line 149 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

double HCE::handlers::DataServerProxy::getResourcesUsageMaxAllowedRange ( void  )
protected

DRCE resources extractor max threads.

Definition at line 165 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getResourcesUsageOrder ( void  )
protected

Resource usage limits.

Definition at line 137 of file DataServerProxy.cpp.

Here is the call graph for this function:

unsigned int HCE::handlers::DataServerProxy::getStatClientRequests ( void  )
protected

Definition at line 219 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getStatClientRequestsSize ( void  )
protected

Definition at line 243 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getStatClientResponses ( void  )
protected

Definition at line 227 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getStatClientResponsesSize ( void  )
protected

Definition at line 251 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float HCE::handlers::DataServerProxy::getStatQPSClient ( void  )
protected

Definition at line 315 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float HCE::handlers::DataServerProxy::getStatQPSServer ( void  )
protected

Definition at line 323 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getStatRequests ( void  )
protected

Definition at line 235 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float HCE::handlers::DataServerProxy::getStatRequestsBandwidthClient ( void  )
protected

Definition at line 347 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float HCE::handlers::DataServerProxy::getStatRequestsBandwidthServer ( void  )
protected

Definition at line 355 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getStatRequestsProcessed ( void  )
protected

Definition at line 283 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getStatRequestsProcessedSize ( void  )
protected

Definition at line 291 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int HCE::handlers::DataServerProxy::getStatRequestsSize ( void  )
protected

Definition at line 259 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float HCE::handlers::DataServerProxy::getStatResponsesBandwidthClient ( void  )
protected

Definition at line 363 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float HCE::handlers::DataServerProxy::getStatResponsesBandwidthServer ( void  )
protected

Send out periodical stats at regular intervals.

Definition at line 371 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float HCE::handlers::DataServerProxy::getStatRPSClient ( void  )
protected

Definition at line 331 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float HCE::handlers::DataServerProxy::getStatRPSServer ( void  )
protected

Definition at line 339 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::handleExternalMessage ( void  )
protected

<Fetch message from dataserver

<Process dataserver's message

<Control message

<Inc data responses counter

<Data message

Reimplemented from HCE::handlers::Handler.

Definition at line 1100 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::handleInternalMessage ( void  )
protected

<Fetch message from inprocontrol

<Create identity, messageId and body of dataclient's message

<No clients connected, make response message and send response for reducer

<Get allowed clients names

<Extract route JSON from routeMessage

<Get nodes list from route message

<Set current resource usage algorithm

<Set current resource usage algorithm weights

<No clients connected, make response message and send response for reducer

<Some client(s) registered

<Re-send data request for all clients connected to dataserver

<Create and send response message

<Make local copy

<No clients connected, make response message and send response for reducer

<Get identity use random algorithm

<Get identity use resource usage algorithm

<Sort clients by frequency of queries done

<Inc freq of best (with minimal freq)

<Save identity for next use

<No clients connected, make response message and send response for reducer

<Node has not allowed resource usage limits

<Create and send response message

<Node mode not supported, make response message and send response for reducer

Reimplemented from HCE::handlers::Handler.

Definition at line 375 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::heartbit ( void  )
protected

<Send heartbeats to idle clients if it's time

<Execute sending heartbeat

<Reset response shift counter

<Execute sending heartbeat

Reimplemented from HCE::handlers::Handler.

Definition at line 1287 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int HCE::handlers::DataServerProxy::initialize ( void  )
protectedvirtual

<Init sockets

<Node init from file

<Heartbeat at time mark

<Send out periodical stats at regular intervals

<Node init

<Check initialization and set default value if necessary

<Apply heartbeat timeout value to client manager

<Apply max resources usage collected size value to client manager

<Rebuild admin client socket

<Rebuild inproc_proxy connection

<Rebuild inproc_reducer_in connection

<Rebuild external server connection

Implements HCE::handlers::Handler.

Definition at line 41 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::logPeriodicStatistics ( void  )
protected

<Out periodical stats

Reimplemented from HCE::handlers::Handler.

Definition at line 1256 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string HCE::handlers::DataServerProxy::makeEmptyResponseMessage ( const std::string &  messageBody,
EmptyResponseType  responseType,
const std::string &  messageRoute,
const std::string &  errorMsg = "" 
)
protected

Send empty response message to reducer.

<No target node clients available

<Node mode not supported

<Chosen node has not allowed resource usage limits

<No target node clients available

<Node mode not supported

<Chosen node has not allowed resource usage limits

Definition at line 1024 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::nodeInit ( const std::string &  iniFile)
protected

Check initialization and set default value if necessary.

<Process Node's ini file

<Set type of calcuator algorithm

<Log some error of config file processing

<Log some error of config file processing

Definition at line 734 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void * HCE::handlers::DataServerProxy::process ( void  )
protectedvirtual

<Handle dataserver socket's message if socket is connected

<Log stats

<Send periodical property values

<Dump run-time variables at regular intervals

<Remove expired clients from queue

Implements HCE::handlers::Handler.

Definition at line 1336 of file DataServerProxy.cpp.

Here is the call graph for this function:

std::string HCE::handlers::DataServerProxy::processAdminCommands ( std::string &  command,
std::string &  parameters 
)
protectedvirtual

Get property information.

<Process commands

<Rebuild server connection

<Disconnect server connection

<Make property information

<Parse command parameters and fetch manager mode value

<Parse command parameters and fetch resources usage collected size

<Parse command parameters

<Parse purge mode from parameters

<Make response

<Set new purge mode

<Parse command parameters

<Parse heartbeat delay from parameters

<Set new heartbeat delay value

<Parse command parameters

<Parse heartbeat timeout from parameters

<Set new heartbeat timeout value

<Parse command parameters

<Parse heartbeat mode from parameters

<Set new heartbeat mode value

<Return cluster node routes list

<Return cluster node resource usage

<Unsupported command

Reimplemented from HCE::handlers::Handler.

Definition at line 1121 of file DataServerProxy.cpp.

Here is the call graph for this function:

void HCE::handlers::DataServerProxy::processControlMessage ( zmsg msg)
protected

<Fetch the clientIdentity field

<Delete client from queue

<Invalid message type

Reimplemented from HCE::handlers::Handler.

Definition at line 914 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::processDataMessage ( zmsg msg)
protected

Get property information.

<Fetch the clientIdentity field

<Get message body

<Create current clients number

<Insert message Id back

<Insert body back

<Insert route back

<Insert clients number field

<Send message

Reimplemented from HCE::handlers::Handler.

Definition at line 965 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::registerClient ( const std::string &  identity)
protected

Admin socket.

Reimplemented from HCE::handlers::Handler.

Definition at line 907 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::sendEmptyResponseMessage ( zmsg msg,
const std::string &  coverMessageBody,
EmptyResponseType  responseType,
const std::string &  messageId,
const std::string &  messageRoute,
const std::string &  errorMsg = "" 
)
protected

Make and send response message.

<Make response message and send response for reducer

<Insert message Id back

<Insert body back

<Insert route back

<Create current clients number

<Insert clients number field

<Send message

Definition at line 700 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::sendHeartbeat ( const std::string &  identity)
protected

<Execute sending heartbeat

Definition at line 1329 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::sendResponseMessage ( const std::string &  identity,
const std::string &  messageId,
const std::string &  messageBody,
const std::string &  messageRoute 
)
protected

Node initialization from ini file.

<Create response message and fill with fields

<Send response

Definition at line 723 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setNodeMode ( unsigned char  nodeMode)
protected

Definition at line 103 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setPeriodicStatClientRequests ( unsigned int  periodicStatClientRequests)
protected

Definition at line 263 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setPeriodicStatClientRequestsSize ( unsigned int  periodicStatClientRequestsSize)
protected

Definition at line 295 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setPeriodicStatClientResponses ( unsigned int  periodicStatClientResponses)
protected

Definition at line 271 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setPeriodicStatClientResponsesSize ( unsigned int  periodicStatClientResponsesSize)
protected

Definition at line 303 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesExtractorMaxDiskSize ( unsigned int  resourcesExtractorMaxDiskSize)
protected

Definition at line 187 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesExtractorMaxProcesses ( unsigned int  resourcesExtractorMaxProcesses)
protected

Definition at line 178 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesExtractorMaxRramSize ( unsigned int  resourcesExtractorMaxRramSize)
protected

Definition at line 205 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesExtractorMaxThreads ( unsigned int  resourcesExtractorMaxThreads)
protected

Definition at line 169 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesExtractorMaxVramSize ( unsigned int  resourcesExtractorMaxVramSize)
protected

Definition at line 196 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesUsageAlg ( unsigned int  resourcesUsageAlg)
protected

Definition at line 111 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesUsageAlg0Weights ( const std::string &  resourcesUsageAlg0Weights)
protected

Definition at line 120 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesUsageCollectedSize ( unsigned int  resourcesUsageCollectedSize)
protected

Definition at line 153 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesUsageLimits ( const std::string &  resourcesUsageLimits)
protected

Definition at line 141 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesUsageMaxAllowedRange ( double  resourcesUsageMaxAllowedRange)
protected

Definition at line 161 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setResourcesUsageOrder ( unsigned int  resourcesUsageOrder)
protected

Definition at line 132 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatClientRequests ( unsigned int  statClientRequests)
protected

Definition at line 215 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatClientRequestsSize ( unsigned int  statRequestsSize)
protected

Definition at line 239 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatClientResponses ( unsigned int  statClientResponses)
protected

Definition at line 223 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatClientResponsesSize ( unsigned int  statResponsesSize)
protected

Definition at line 247 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatQPSClient ( float  statQPSClient)
protected

Definition at line 311 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatQPSServer ( float  statQPSServer)
protected

Definition at line 319 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatRequests ( unsigned int  statRequests)
protected

Definition at line 231 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatRequestsBandwidthClient ( float  statRequestsBandwidthClient)
protected

Definition at line 343 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatRequestsBandwidthServer ( float  statRequestsBandwidthServer)
protected

Definition at line 351 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatRequestsProcessed ( unsigned int  statRequestsProcessed)
protected

Definition at line 279 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatRequestsProcessedSize ( unsigned int  statRequestsProcessedSize)
protected

Definition at line 287 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatRequestsSize ( unsigned int  statRequestsSize)
protected

Definition at line 255 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatResponsesBandwidthClient ( float  statResponsesBandwidthClient)
protected

Definition at line 359 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatResponsesBandwidthServer ( float  statResponsesBandwidthServer)
protected

Definition at line 367 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatRPSClient ( float  statRPSClient)
protected

Definition at line 327 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void HCE::handlers::DataServerProxy::setStatRPSServer ( float  statRPSServer)
protected

Definition at line 335 of file DataServerProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

ClientsQueueManager* HCE::handlers::DataServerProxy::_clientsManager
protected

Heartbeat at time mark.

Definition at line 130 of file DataServerProxy.hpp.

std::vector<ClientWorkerItem> HCE::handlers::DataServerProxy::_clientsQueue
protected

Definition at line 127 of file DataServerProxy.hpp.

zmq::socket_t* HCE::handlers::DataServerProxy::_dataServerSock
protected

Previous client number.

Definition at line 102 of file DataServerProxy.hpp.

int64_t HCE::handlers::DataServerProxy::_heartbeatAt
protected

Node mode: router, shard manager, replica manager or replica.

Definition at line 133 of file DataServerProxy.hpp.

zmq::socket_t* HCE::handlers::DataServerProxy::_inprocProxySock
protected

Definition at line 98 of file DataServerProxy.hpp.

zmq::socket_t* HCE::handlers::DataServerProxy::_inprocReducerInSock
protected

Definition at line 99 of file DataServerProxy.hpp.

size_t HCE::handlers::DataServerProxy::_previousClientNumber
protected

Random client number genertor.

Definition at line 105 of file DataServerProxy.hpp.

int64_t HCE::handlers::DataServerProxy::_pstatsAt = s_clock() + HEARTBEAT_DELAY
protected

Definition at line 243 of file DataServerProxy.hpp.

ResourceUsageManager HCE::handlers::DataServerProxy::_resourceUsageManager
protected

Queue of connected clients.

Definition at line 126 of file DataServerProxy.hpp.

CalculatorAlgorithmData HCE::handlers::DataServerProxy::calculatorAlgorithmData
protected

Resource usage limits data.

Definition at line 118 of file DataServerProxy.hpp.

ResourceUsageLimitsData HCE::handlers::DataServerProxy::resourceUsageLimitsData
protected

Type of algorithm for balancing calculator.

Definition at line 120 of file DataServerProxy.hpp.

CalculatorAlgorithm::Types HCE::handlers::DataServerProxy::typeCalculatorAlgorithm
protected

Resource usage manager.

Definition at line 123 of file DataServerProxy.hpp.


The documentation for this class was generated from the following files: