Sirikata
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
Sirikata::CSFQODPFlowScheduler Class Reference

CSFQODPFlowScheduler tracks all active flows and uses a CSFQ-style approach to enforce fairness over those flows. More...

#include <CSFQODPFlowScheduler.hpp>

Inheritance diagram for Sirikata::CSFQODPFlowScheduler:
Collaboration diagram for Sirikata::CSFQODPFlowScheduler:

List of all members.

Classes

struct  FlowInfo
struct  ObjectPair
struct  QueuedMessage

Public Member Functions

 CSFQODPFlowScheduler (SpaceContext *ctx, ForwarderServiceQueue *parent, ServerID sid, uint32 serv_id, uint32 max_size, LocationService *loc)
virtual ~CSFQODPFlowScheduler ()
virtual const Typefront () const
virtual Typefront ()
virtual Type pop ()
virtual bool empty () const
virtual uint32 size () const
virtual bool push (Sirikata::Protocol::Object::ObjectMessage *msg, const OSegEntry &, const OSegEntry &)
virtual float totalActiveWeight ()
virtual float totalSenderUsedWeight ()
virtual float totalReceiverUsedWeight ()

Private Types

enum  { SENDER = 0, RECEIVER = 1, NUM_DOWNSTREAM = 2 }
typedef
std::tr1::unordered_map
< ObjectPair, FlowInfo,
ObjectPair::Hasher
FlowMap

Private Member Functions

FlowInfogetFlow (const ObjectPair &new_packet_pair, const OSegEntry &src_info, const OSegEntry &dst_info, const Time &t)
void removeFlow (const ObjectPair &packet_pair)
int flowCount () const
float normalizedFlowWeight (float unnorm_weight)
void estimateAlpha (int32 packet_size, Time &arrival_time, double label, bool dropped)
bool queueExceedsLowWaterMark () const
double minCongestedAlpha () const
BoundingBox3f getObjectWeightRegion (const UUID &objid, const OSegEntry &sid) const

Private Attributes

boost::mutex mPushMutex
QueuedMessage mQueueBuffer
Sirikata::SizedThreadSafeQueue
< QueuedMessage
mQueue
Sirikata::AtomicValue< bool > mNeedsNotification
LocationServicemLoc
SimpleRateEstimator mArrivalRate
double mSumEstimatedArrivalRates
SimpleRateEstimator mAcceptedRate
SimpleRateEstimator mCapacityRate
double mAlpha
double mAlphaWindowed
bool mCongested
Time mCongestionStartTime
Duration mCongestionWindow
int mKAlphaReductionsLeft
FlowMap mFlows
double mTotalActiveWeight
double mTotalUsedWeight [NUM_DOWNSTREAM]

Detailed Description

CSFQODPFlowScheduler tracks all active flows and uses a CSFQ-style approach to enforce fairness over those flows.


Member Typedef Documentation

typedef std::tr1::unordered_map<ObjectPair, FlowInfo, ObjectPair::Hasher> Sirikata::CSFQODPFlowScheduler::FlowMap [private]

Member Enumeration Documentation

anonymous enum [private]
Enumerator:
SENDER 
RECEIVER 
NUM_DOWNSTREAM 

Constructor & Destructor Documentation

Sirikata::CSFQODPFlowScheduler::CSFQODPFlowScheduler ( SpaceContext ctx,
ForwarderServiceQueue parent,
ServerID  sid,
uint32  serv_id,
uint32  max_size,
LocationService loc 
)

References mTotalUsedWeight, and NUM_DOWNSTREAM.

Sirikata::CSFQODPFlowScheduler::~CSFQODPFlowScheduler ( ) [virtual]

Member Function Documentation

bool Sirikata::CSFQODPFlowScheduler::empty ( ) const [virtual]
void Sirikata::CSFQODPFlowScheduler::estimateAlpha ( int32  packet_size,
Time arrival_time,
double  label,
bool  dropped 
) [private]
int Sirikata::CSFQODPFlowScheduler::flowCount ( ) const [private]

References mFlows.

Referenced by minCongestedAlpha().

const CSFQODPFlowScheduler::Type & Sirikata::CSFQODPFlowScheduler::front ( ) const [virtual]
CSFQODPFlowScheduler::Type & Sirikata::CSFQODPFlowScheduler::front ( ) [virtual]
CSFQODPFlowScheduler::FlowInfo * Sirikata::CSFQODPFlowScheduler::getFlow ( const ObjectPair new_packet_pair,
const OSegEntry src_info,
const OSegEntry dst_info,
const Time t 
) [private]
BoundingBox3f Sirikata::CSFQODPFlowScheduler::getObjectWeightRegion ( const UUID objid,
const OSegEntry sid 
) const [private]
double Sirikata::CSFQODPFlowScheduler::minCongestedAlpha ( ) const [inline, private]
float Sirikata::CSFQODPFlowScheduler::normalizedFlowWeight ( float  unnorm_weight) [private]

References mTotalActiveWeight.

Referenced by push().

CSFQODPFlowScheduler::Type Sirikata::CSFQODPFlowScheduler::pop ( ) [virtual]
bool Sirikata::CSFQODPFlowScheduler::push ( Sirikata::Protocol::Object::ObjectMessage *  msg,
const OSegEntry source_entry,
const OSegEntry dest_entry 
) [virtual]
bool Sirikata::CSFQODPFlowScheduler::queueExceedsLowWaterMark ( ) const [inline, private]

Referenced by estimateAlpha().

void Sirikata::CSFQODPFlowScheduler::removeFlow ( const ObjectPair packet_pair) [private]
virtual uint32 Sirikata::CSFQODPFlowScheduler::size ( ) const [inline, virtual]
float Sirikata::CSFQODPFlowScheduler::totalActiveWeight ( ) [virtual]
float Sirikata::CSFQODPFlowScheduler::totalReceiverUsedWeight ( ) [virtual]
float Sirikata::CSFQODPFlowScheduler::totalSenderUsedWeight ( ) [virtual]

Implements Sirikata::ODPFlowScheduler.

References mTotalUsedWeight, and SENDER.


Member Data Documentation

Referenced by estimateAlpha().

Referenced by estimateAlpha(), and push().

Referenced by estimateAlpha().

Referenced by estimateAlpha(), and push().

Referenced by minCongestedAlpha(), and pop().

Referenced by estimateAlpha().

Referenced by estimateAlpha().

Referenced by estimateAlpha().

Referenced by estimateAlpha(), and push().

Referenced by getObjectWeightRegion().

Referenced by empty(), front(), and push().

Referenced by push().

Referenced by empty(), front(), push(), and size().

Referenced by empty(), front(), and pop().

Referenced by push().

double Sirikata::CSFQODPFlowScheduler::mTotalUsedWeight[NUM_DOWNSTREAM] [private]

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