Sirikata
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
Sirikata::ODPFlowScheduler Class Reference

An ODPFlowScheduler acts as a filter and queue for ODP messages for a single server. More...

#include <ODPFlowScheduler.hpp>

Inheritance diagram for Sirikata::ODPFlowScheduler:
Collaboration diagram for Sirikata::ODPFlowScheduler:

List of all members.

Public Types

typedef AbstractQueue< Message * >
::Type 
Type

Public Member Functions

 ODPFlowScheduler (SpaceContext *ctx, ForwarderServiceQueue *parent, ServerID sid, uint32 serv_id)
virtual ~ODPFlowScheduler ()
virtual QueueEnum::PushResult push (const Type &msg)
virtual const Typefront () const =0
virtual Typefront ()=0
virtual Type pop ()=0
virtual bool empty () const =0
virtual uint32 size () const =0
virtual bool push (Sirikata::Protocol::Object::ObjectMessage *msg, const OSegEntry &sourceObjectData, const OSegEntry &dstObjectData)=0
virtual float totalActiveWeight ()=0
virtual float totalSenderUsedWeight ()=0
virtual float totalReceiverUsedWeight ()=0
void updateSenderStats (double total_weight, double capacity)
void updateReceiverStats (double total_weight, double capacity)

Protected Member Functions

void notifyPushFront ()
MessagecreateMessageFromODP (Sirikata::Protocol::Object::ObjectMessage *obj_msg, ServerID dest_serv)

Protected Attributes

SpaceContextmContext
ForwarderServiceQueuemParent
ServerID mDestServer
uint32 mServiceID
double mSenderTotalWeight
double mSenderCapacity
double mReceiverTotalWeight
double mReceiverCapacity
RegionWeightCalculatormWeightCalculator

Detailed Description

An ODPFlowScheduler acts as a filter and queue for ODP messages for a single server.

It has 2 primary roles. First, it acts as an ODP input queue for ForwarderServiceQueue; i.e. queues ODP messages, converts them to server messages, and serves them up for ForwarderServiceQueue. Therefore it implements AbstractQueue<Message*>, but uses the ForwarderService::notifyPush back channel, and forces failure if somebody tries to push(Message*) to it.

Second, it collects statistics about active flows and makes that data available to the rest of the system. This data is used in 2 ways: first, on the send side it is used to set the weights on the ServerMessageQueue to schedule between destination servers: i.e. its really just used to create a hierarchical fair queue. It is also used by the receive side: the Forwarder has a control channel which forwards these weights to the destination, which uses them to determine the total weight of active flows for each source server, allowing it to properly balance the input rates.


Member Typedef Documentation


Constructor & Destructor Documentation

Sirikata::ODPFlowScheduler::ODPFlowScheduler ( SpaceContext ctx,
ForwarderServiceQueue parent,
ServerID  sid,
uint32  serv_id 
) [inline]
virtual Sirikata::ODPFlowScheduler::~ODPFlowScheduler ( ) [inline, virtual]

References mWeightCalculator.


Member Function Documentation

Message* Sirikata::ODPFlowScheduler::createMessageFromODP ( Sirikata::Protocol::Object::ObjectMessage *  obj_msg,
ServerID  dest_serv 
) [inline, protected]
virtual bool Sirikata::ODPFlowScheduler::empty ( ) const [pure virtual]
virtual const Type& Sirikata::ODPFlowScheduler::front ( ) const [pure virtual]
virtual Type& Sirikata::ODPFlowScheduler::front ( ) [pure virtual]
void Sirikata::ODPFlowScheduler::notifyPushFront ( ) [inline, protected]
virtual Type Sirikata::ODPFlowScheduler::pop ( ) [pure virtual]
virtual QueueEnum::PushResult Sirikata::ODPFlowScheduler::push ( const Type msg) [inline, virtual]
virtual bool Sirikata::ODPFlowScheduler::push ( Sirikata::Protocol::Object::ObjectMessage *  msg,
const OSegEntry sourceObjectData,
const OSegEntry dstObjectData 
) [pure virtual]
virtual uint32 Sirikata::ODPFlowScheduler::size ( ) const [pure virtual]
virtual float Sirikata::ODPFlowScheduler::totalActiveWeight ( ) [pure virtual]
virtual float Sirikata::ODPFlowScheduler::totalReceiverUsedWeight ( ) [pure virtual]
virtual float Sirikata::ODPFlowScheduler::totalSenderUsedWeight ( ) [pure virtual]
void Sirikata::ODPFlowScheduler::updateReceiverStats ( double  total_weight,
double  capacity 
) [inline]
void Sirikata::ODPFlowScheduler::updateSenderStats ( double  total_weight,
double  capacity 
) [inline]

Member Data Documentation

Referenced by notifyPushFront().

Referenced by notifyPushFront().


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