Hybrid Query Processing Engine for Coprocessing in Database Systems
HyPE
|
Base class for all optimization criterions. More...
#include <optimization_criterion.hpp>
Public Member Functions | |
const SchedulingDecision | getOptimalAlgorithm (const Tuple &input_values, Operation &op, DeviceTypeConstraint dev_constr) |
gets a Scheduling Decision with the algorithm that is (likely to be) optimal w.r.t. to an optimization criterion | |
const std::string & | getName () const |
returns the name of the OptimizationCriterion | |
virtual | ~OptimizationCriterion_Internal () |
Destructor is virtual, because OptimizationCriterion is intended to be a base class. | |
Protected Member Functions | |
OptimizationCriterion_Internal (const std::string &name_of_optimization_criterion, const std::string &name_of_operation) | |
constructor of class | |
Protected Attributes | |
std::map< std::string, unsigned int > | map_algorithmname_to_number_of_executions_ |
map that keeps track which algorithms were decided for how often | |
Private Member Functions | |
virtual const SchedulingDecision | getOptimalAlgorithm_internal (const Tuple &input_values, Operation &op, DeviceTypeConstraint dev_constr)=0 |
this function is called by getOptimalAlgorithm() to ensure an easy extensibility of the library | |
Private Attributes | |
std::string | name_of_optimization_criterion_ |
stores name of optimization criterion, which is represented by this object | |
std::string | name_of_operation_ |
stores the name of the operation, where this OptimizationCriterion belongs to |
OptimizationCriterion enables the user to choose a (likely) optimal algorithm for an operation w.r.t. the features of the dataset to process, which are stored in a Tuple object. The internal function getOptimalAlgorithm_internal() has to be implemented by derived classes.
Definition at line 37 of file optimization_criterion.hpp.
Definition at line 126 of file optimization_criterion.cpp.
hype::core::OptimizationCriterion_Internal::OptimizationCriterion_Internal | ( | const std::string & | name_of_optimization_criterion, |
const std::string & | name_of_operation | ||
) | [protected] |
name_of_optimization_criterion | Name of the optimization criterion |
name_of_operation | name of the operation, where this OptimizationCriterion belongs to |
Definition at line 123 of file optimization_criterion.cpp.
const std::string & hype::core::OptimizationCriterion_Internal::getName | ( | ) | const |
Definition at line 118 of file optimization_criterion.cpp.
Referenced by hype::core::Throughput::getOptimalAlgorithm_internal(), and hype::core::Throughput2::getOptimalAlgorithm_internal().
const SchedulingDecision hype::core::OptimizationCriterion_Internal::getOptimalAlgorithm | ( | const Tuple & | input_values, |
Operation & | op, | ||
DeviceTypeConstraint | dev_constr | ||
) |
calls the pure virtual function getOptimalAlgorithm_internal() to ensure functional correctness on one hand (by implementing features that would have to be reimplemented by the user) and extensibility on the othere hand, meaning a derived class can implement an arbitraty heuristic that tries to optimze for a certain optimization criterion.
input_values | features of the input data set that is to process by Operation op |
op | a reference to the operation to perfrom on a data et |
Definition at line 19 of file optimization_criterion.cpp.
References ANY_DEVICE, hype::core::Operation::getAlgorithm(), hype::core::Operation::getAlgorithms(), hype::core::Operation::getCurrentTimestamp(), quiet, and verbose.
virtual const SchedulingDecision hype::core::OptimizationCriterion_Internal::getOptimalAlgorithm_internal | ( | const Tuple & | input_values, |
Operation & | op, | ||
DeviceTypeConstraint | dev_constr | ||
) | [private, pure virtual] |
has to be implemented by derived classes
\return |
Implemented in hype::core::ProbabilityBasedOutsourcing, hype::core::ResponseTime, hype::core::WaitingTimeAwareResponseTime, hype::core::SimpleRoundRobin, hype::core::Throughput, and hype::core::Throughput2.
std::map<std::string,unsigned int> hype::core::OptimizationCriterion_Internal::map_algorithmname_to_number_of_executions_ [protected] |
through algorithms have a statistic for that, it is not up to date during runtime, since there are algorithms in execution, which have not yet terminated This can lead to a burst execution of operations with one algorithm. This map helps to avoid this by keeping track on the number of DECITIONS for each algorithm
Definition at line 65 of file optimization_criterion.hpp.
std::string hype::core::OptimizationCriterion_Internal::name_of_operation_ [private] |
Definition at line 76 of file optimization_criterion.hpp.
std::string hype::core::OptimizationCriterion_Internal::name_of_optimization_criterion_ [private] |
Definition at line 74 of file optimization_criterion.hpp.