wrench::NetworkProximityService Class Reference

A simulated network proximity service that estimates inter-host latencies and can be queries for such estimates. More...

#include <NetworkProximityService.h>

Inheritance diagram for wrench::NetworkProximityService:
wrench::Service

Public Member Functions

 NetworkProximityService (std::string db_hostname, std::vector< std::string > hosts_in_network, std::map< std::string, std::string >={})
 Constructor. More...
 
double query (std::pair< std::string, std::string > hosts)
 Look up for the proximity value in database. More...
 
std::vector< std::string > getHostnameList ()
 Gets the list of hosts monitored by this service (does not involve simulated network communications with the service) More...
 
std::pair< double, double > getCoordinate (std::string)
 Look up the current (x,y) coordinates of a given host for Vivaldi network service type. More...
 
std::string getNetworkProximityServiceType ()
 Get the network proximity service type. More...
 

Static Public Attributes

static constexpr double NOT_AVAILABLE = DBL_MAX
 A convenient constant that is returned as a latency between two hosts when no latency estimates are available for this pair of hosts.
 

Detailed Description

A simulated network proximity service that estimates inter-host latencies and can be queries for such estimates.

Constructor & Destructor Documentation

wrench::NetworkProximityService::NetworkProximityService ( std::string  hostname,
std::vector< std::string >  hosts_in_network,
std::map< std::string, std::string >  plist = {} 
)

Constructor.

Parameters
hostnamethe hostname on which to start the service
hosts_in_networkthe hosts running in the network
plista property list ({} means "use all defaults")

Member Function Documentation

std::pair< double, double > wrench::NetworkProximityService::getCoordinate ( std::string  requested_host)

Look up the current (x,y) coordinates of a given host for Vivaldi network service type.

Parameters
requested_hostthe host whose coordinates are being requested
Returns
The pair (x,y) coordinate values
Exceptions
WorkFlowExecutionException
std::runtime_error
std::vector< std::string > wrench::NetworkProximityService::getHostnameList ( )

Gets the list of hosts monitored by this service (does not involve simulated network communications with the service)

Returns
a list of hostnames
std::string wrench::NetworkProximityService::getNetworkProximityServiceType ( )

Get the network proximity service type.

Returns
a string specifying the network proximity service type
double wrench::NetworkProximityService::query ( std::pair< std::string, std::string >  hosts)

Look up for the proximity value in database.

Parameters
hoststhe pair of hosts to look for the proximity value
Returns
The proximity value between the pair of hosts
Exceptions
WorkflowExecutionException
std::runtime_error

The documentation for this class was generated from the following files:
  • /home/wrench/wrench/include/wrench/services/network_proximity/NetworkProximityService.h
  • /home/wrench/wrench/src/wrench/services/network_proximity/NetworkProximityService.cpp