• No results found

4.6 Network Use Management

4.6.8 Session Establishment

In C-CAST specications this process is supposed to be started by Session Manager module which sends a session request message to NUM. Considering that there is no code available to simulate this element, it was necessary to implement its basic

functions.

Then, in the implementation made, a Tcl command was developed to trigger NUM so it can start the session establishment process. This command provides the informa- tion about which users want to receive the specied ows in a certain session. When NUM receive this information, it sends a message packet to context broker requesting the context of the users and ows involved in this session.

After the response of context broker, NUM has all the information needed to decide the best way to deliver the trac ows to the users.

Since each session request can include several users that want to receive one or more ows, the algorithm is executed for all of these users, one at a time. Regarding each user, the algorithm treats separately the ows requested.

The rst action performed is to search for the Access Point that would provide the best connection to the user. This is made by the function decide_AP which receives as arguments the user and ow contexts. The development of this function was made in the complementary Thesis already referred.

After retrieving the AP in which the user would be connected, it is also necessary to decide the best suited path in the core network in order to maintain the established QoS parameters of the multiparty content delivery. Therefore, it is called a function named decisionAlgorithm to perform this decision. Its arguments are the session identier, the AP previously chosen, the user and ow contexts. This function is the core of all the implementation regarding the session establishment. All the other functions are used to gather and process information in order to provide updated information about the current state of the network whenever this function is executed.

The function decisionAlgorithm starts by searching in the structure pathsFid if exists a path already reserved for the specied ow from the source of trac until the chosen AP. If it eectively exists there is no need to reserve it again, being just necessary to join the user to the multicast group of the trac.

However, even if it does not exist a reservation already made for the entire path, but there are reserved paths from the same source to other APs, they might be used as a base to expand the multiparty tree to the correct AP. So, if any of these paths contains interior ONs, it can be used from the source until one of these interior ONs. In this way, it is just necessary to discover another sub-path from this ON to the correct AP. In order to form the best end-to-end path, all the possible conjugations of sub-paths have to be analyzed and compared to each other.

Thus, considering the rst sub-path holded in pathsFid that can be used as base to expand the multiparty tree, it is called the function ndPaths to discover alternative sub-paths between the interior ON and the correct AP. These alternative sub-paths are

stored in the structure pathsSess. Then, the function pathDecision is used to choose the best alternative sub-path among them. This selected sub-path is saved in auxiliary variables so it can be compared. For the second suitable sub-path holded in pathsFid the process is repeated, but comparing in the nal the alternative sub-path founded with the one previously saved in the auxiliary variables. If the later is better, the auxiliary variables are updated with its characteristics. On the other side, if the former is better, the auxiliary variables remain unmodied. This mechanism is repeated for all the paths that might be used as base to expand the multiparty tree, which permits to achieve the best end-to-end path in the core network to connect the user. Finally, when the overall best path is found, the reservation is done and all the structures that hold information about the network are updated.

This mechanism takes advantage from the existing reservations in the network, op- timizing then the resources. Due to the complexity of the code implemented to simulate this case, the process is described in Figure 20 to better understanding.This method introduces the concept of Sub-AMTs, which are considered to be as sub-networks con- tained between two ONs. For example, referring to the Figure 16, consider that the terminal T1 was already connected and the terminal T2 is requesting a connection for the same ow. The path from the source node until ION1 is the rst Sub-AMT. The second Sub-AMT is conned between the nodes ION1 and CON1, and the path that will be calculated between CON1 and EON3, which is connected to the correct AP, is the third Sub-AMT.

On the other hand, if the structure pathsFid does not hold any path that can be used to this user, the algorithm proceeds to the calculation of brand new paths from the source node to the AP. After selecting the best one, NUM informs MTO about the reservation parameters, and update the network information in all the structures.

The entire execution of this process is described in the diagram presented in Figure 20.

Session Establishment User Context Session Context Flow Context

Requires for the best AP to connect the user, if available Is there an available AP? Analyse the structure pathsFid Is there any complete path already reserved

for this flow to the AP? Join the user

to the multicast group Inicialize auxiliar variables

Analyse the first path of pathFid structure Is this the last path in pathsFid? Jump to the next path

Consider the closest ON to the AP Search for the best path between the ON and the AP using findPaths and

pathDecision Was found any suitable path? This path contains interior ONs? There are more ONs in the path? Jump to the next ON in the path

Is this the first path found or is it better than the

last found? Update the path variables Was found a suitable path? Search for a brand new

path from the source to the AP using findPath and

pathDecision

Was found a suitable

path?

Reserve the path and update the

structures End of function No paths available in the core No APs available Session Setup trigger Yes No Yes Yes Yes Yes Yes Yes Yes Yes No No No No No No No No

Since this process involves the interaction of dierent elements, it is presented in Figure 21 the signalling necessary to enable the session establishment.

SM NUM MTO CB

Session Setup request

Contexts Acquisition Request Contexts Infomation Request Best Access

Network Connection Return Best Access Network Connection

Configure MTO parameters to join a

group or reserve a path

- Selects the best communication path to connect the user - Allocates IP multicast address (if applicable)

- Allocates communications port - Configure MTO tree connections - Start data delivery

Figure 21: High-Level Message Sequence for Session Setup.