# Video Streaming Adaptive QoS Routing with Resource Reservation (VQoSRR) Model for SDN Networks
## 3 The Proposed VQoSRR Framework
### The VQoSRR QoS Routing Mechanism  
We proposed a QoS-aware adaptive routing approach for video streaming. It calculates the forwarding paths between any two nodes and enables QoS configuration on data plane devices. In this work, we focused on enhancing the QoE of two types of video streaming resolutions (HD and SD), so we investigated their QoS thresholds and applied them as criteria for quality decisions. The QoS parameters thresholds that we guaranteed in our QBR method are packet loss and bandwidth, and we used them as metrics to choose the feasible paths, more details in [7]. Described below is the workflow of our routing mechanism functionalities:  
* Initially, the controller uses the topology manager and statistics collector to discover the network topology and collect network status information from the forwarding elements. Then, we generate a weighted graph where each link is associated with packet loss rate and available bandwidth values. These two steps run periodically for a specified configured time.
* Secondly, when the server initiates a new video stream flow, the switch sends a copy of the first packet of the flow to the controller QoS routing manager to find the routing path.
* Next, we find QoS-based routing feasible paths by QoS routing manager algorithms, where the VQoSRR determines two routing paths to balance between frequent dynamic updating of network state and reduces routing computation overheads. The idea is to use one route for the current flow routing and store the other as an alternative path for rerouting purposes.
* After that, the QoS resource manager sends back the routing rules of the flow routing path to the switches by using the OpenFlow protocol.
* Finally, a dynamic routing modification happens whenever the state changes. As metrics need to be updated frequently, flow path procedures should minimize computation overhead associated with routing. Therefore, when the VQoSRR controller receives a new network status, it does not calculate a new path directly for running flows; it instead uses an algorithm and predefined flags to determine whether to use the alternative routing paths or generate a new one. These flags facilitate the admission control process under policies. Table 2 shows an example of the routing path and flags' storage structure; for example, the first row indicates there is ongoing flow with ID 1. In addition, we find two paths that meet their thresholds: the first path is the current flow path, and the second path is an alternative in case the first path violates the flow thresholds. The path count field indicates the number of paths attached to this flow (there are two paths available: one primary and one alternative). Finally, the admission field tells whether this flow has admitted its QoS requirement or been rejected (it admitted for Flow 1).  
This work integrates three algorithms in order to provide QoS-aware video routing. First algorithm (TwoLLWPs) [7] determines two feasible paths between the server and client based on packet loss rate and available bandwidth; these metrics meet the video QoE request constraints. A detailed investigation of TwoLLWPs and its implementation has already been published [7]. Second algorithm is for adaptive rerouting. Third algorithm is for setting up and updating flow tables by paths' rules. Below are the descriptions of the second and third algorithms, Sections 3.2.1 and 3.2.2, respectively.