|
A local node can pass the streaming data on to remote nodes. On a received request sent by a remote node, the local node has to check whether he can serve a new outbound link or not. This part of the connection setup is handled by the admission control component.
The cycle
After receiving a so-called ActivationRequest, the local node passes it to the admission control component. A request contains the address of the sender and the requested part of a stream. Now the admission control performs several tests which base upon Arraymeasuring bandwidth: - measuring the bandwidth capacity of the local node.
- calculating the bandwidth capacity of the connection to the remote node.
- getting the bandwidth requirements of the stream.
- measuring the bandwidth used by the already admitted outbounding links.
Then, the decision over the setup of a new connection is made by one of the following four algorithms:
- Fixed Number of Streams (FX)
- Measured Sum (MS)
- Hoeffding Bound (HB)
- Tangent At Peak (TP)
The algorithms only differ in the kind of parameters they use, the basic formula is the same:
(used bandwidth admitted link) + (bandwidth required by new link) <= capacity local node
If the admission of the new link meets this condition, the request is accepted and after informing the remote node the local node starts streaming the data.
Developers note: See package org.ekstream.admissioncontrol
Rating of connections
Serving a new link should not have an influence on already admitted connections. So you have to find a way of getting to know the state of the system (number of served links) and rate it.
In the ekStream the rating for a connection is done through Arraybandwidth measurements. The links are registrated in the Arraylink control . So the links to be considered (the outbounding ones in state streaming or active) can be accessed through the linkroster object.
Measuring the local nodes bandwidth capacity is done by comparing the already measured values of the other outbounding links. The local nodes uses the biggest measured value of one of the known connections as the own bandwidth capacity. Although this can end in some troubles for very special cases, it works for the majority.
The bandwidth requirement for the new connection cannot be measured because there no data is sent. Therefore, and because there exists a definition of the streams on every node, the admission control uses this standard value.
The decision algorithms
The four algorithms vary in their way of combing the measured values. Therefore they weight the connections in different ways. This should be notable by the number of admitted streams. Admitting more links than the simple addition of values would allow is called a more hazardous behaviour.
- Fixed Number of Streams (FX)
For this algorithm you can set an upper bound for the number of admitted outbounding links and the bandwidth they use at runtime. Once set the algorithm checks these values on every request and will never exceed them. So before you enter values check the log to have an idea of reasonable ones. This algorithm doesn't use bandwidth measuring. All connection are weight with the bandwidth they use by definition.
Developers note: Both values are the parameters of the constructor.
This algorithm is the first step to a more hazardous behaviour of the admission control. For all already admitted links the current load is measured and summed up. Adding the bandwidth of the new connection (known through definition) may not exceed the capacity. There is also the possibility of scaling the capacity through a parameter.
This algorithm uses the Hoeffding Bound (known from the probabilistic theory) for combining peaks rates and current load of the admitted links. The current load is summed up for every admitted link and the peak rates are combined in a specific way, which can be affected by a parameter. Both results and the value of the new connection (again, the value given by the stream definition) are added up.
Again a result of the probabilistic theory is used, this time the so-called Chernoff Bound. It combines peak rate and current load of every link (in a certain ratio), and this time this is done for all connection (admitted and new). Again there is a parameter to have an impact on the ratio.
Developers note: Adding a new algorithm should be done by implement the "DecisionTest" interface.
Checking the functionality of the component
Take a look in log file to check at runtime what the admission control is doing. For a quicker access you may choose to filter the entries for "DecisionAlgo". In the picture below you can see an example.
Every log entry starts with the current time and the name of the class which threw the message. The lines are telling you that:
- line 01 : The name of the current decision algorithm and the value for the algorithm specific parameter.
- line 02 : The bandwidth measured for the local node.
- line 03-04 : The measured values for known "active" links: current load, peak load and the link value, which is computed by the specific formula of current algorithm.
- line 05-12 : The measured values for all known "streaming" links: current load, peak load, link value
- line 13 : Adding up the values for all "active", "streaming" and the new link. This adding also depends on the specific formula of the current algorithm.
- line 14 : The result. You can get whether "acceppted" or "denied". If the ActivationRequest is denied you also see the value by which the capacity is exeeded.
In every line a link is mentioned you can also see the exact link identificator, which is unique in the whole system. The size of the whole message depends on the current size of the link roster (the number of known links).
Developers note: If you want ekStream to switch the decision algorithm go to the contructor of the class "Admission Controler" and take a look at the given example.
Future work
Right now the ekStream system is only able to stream one session,which means the audio and video streams of one kind of source. In orderto provide the possibility of multiple streams some changes have to bedone. For the admission control this means to implement a feature forchecking the availabilty of a certain session (the full stream or apart of it) on the local node.
A possible improvement is also the estimation of the local nodes bandwidth.
Developers note: This should be done via the class StreamIDTest in the admission control package.
author: Carsten König
|