• Keine Ergebnisse gefunden

In this Section we describe the basic outline of our novel distributed approach and how it en-gages network motifs in local decision rules for constructing robust streaming topologies.

4.4.1 Network Motifs

In streaming networks, due to security implications, it is important that the peers know as little about the network topology as possible. Network motifs provide exactly the required non-intrusive way of looking at the surrounding environment of a given peer. Therefore, we engage them in a simple decision rule. When the participating peers obey that rule they improve their local environment. More importantly, those multiple local changes lead to significant improvement of the global properties of the underlying overlay network.

From the problem description, see Section 4.2, it can be derived that the best case, thus the theoretically optimal solution, is to create an optimally balanced spanning tree of minimum height for each of the k stripes. An example of such a topology is displayed in Figure 4.1, it consists ofN =37nodes and maximum number of neighbors (outgoing and ingoing)nma x =4.

Figure 4.1:Example of an optimal topology,N =37,nma x=4(cmp. [86]).

Our key observation is that the nodes in an optimal topology can be divided in three groups.

In the first group are the internal nodes. They have the full number of direct successors: d = nma x−1=c·k and each of the successors has d direct successors on their turn. The group of internal nodes includes the roots. The second group of nodes are theintermediatenodes. Those are the nodes which all have d direct successors, but some/all of those successors are leaves.

4.4 System Design 69

The intermediate nodes are the nodes on the last but one layer in the topology. The last group of nodes are theleavesof the topology, which have no successors.

One observes that in the optimal topology only the first and third directed three-node motifs are present, see Figures 3.1 and 4.1. Throughout this Chapter we refer to these two motifs as motif 1 and motif 3 respectively.

Furthermore, the three groups of nodes have very distinct local motif signatures, i.e. the type and number of motifs a node is involved in. If one computes the local motif signature of each node in the optimal topology and sort them in ascending order with respect to the ratio of motif 1 to motif 3, one gets a clear three phase transition of local motif signatures, see Figure 4.2.

-1 0 1 2 3 4 5 6 7

0 50 100 150 200 250

Ratio of motif 1 to motif 3

Motif ratio values of the nodes in ascending order

Ratio of Motif 1 to Motif 3 in Ascending Order

Figure 4.2:Motif ratio phase transition of an optimal topology.

Note that when a node is not involved in any motif 3 instances, then its ration is set to zero.

When it is not involved in any motif 1 instances, its ratio is set tod!. In this way the motif ratio is always well defined.

From the three phase transition in Figure 4.2 one can easily distinguish the three classes of nodes. All leaves have ratio value of six, the intermediate nodes ratio value of zero and the internal nodes have ratios between these two values.

In the next Section we show how one can benefit from the above observed phase transition.

4.4.2 Engaging Network Motifs in Topology Optimization

To construct local decision rules for optimizing live-streaming topologies, we consider the phase transition shown in Figure 4.2. One observes that the few internal nodes have a specific motif ratio. Its value can be computed from the maximum number of successors d, representing the bandwidth capacities of the nodes. The number of motif 1 instances an internal node is involved in is equal to all pair combinations of its successors without repetition and is given byPd−1

i=1 i.

The number of motif 3 instances is given byPd

i=1di because each successor has d successors on its turn and this results in d instances of motif 3 per successor. Thus, the ratio θ of motif 1 and motif 3 for each internal node, which we call thethreshold, is then given by:

θ = Pd−1

i=1 i Pd

i=1d =

d(d−1) 2

d2 = d−1 2d = 1

2− 1

2d (4.1)

This thresholdθ is in then used in the local decision rules of our approach.

4.4.3 Implementation

In this Section we present the workflow of our new motif-based approach.

The source node s is the initial bootstrap node. It estimates the minimum bandwidth d the participating peers should provide depending on their expected configuration. Then, it divides the original signal ink stripes and waits for the rest of the participants to join the network. The value ofθ is derived from the estimation ofd and provided to the joining peers.

Each node is provided with aNode Manager(NM). When a node joins the overlay, it randomly joins at allkstripes as a leaf. The NM monitors that the overall used bandwidth over allkstripes is less than the available bandwidth of its node.

The outline of the algorithm is as follows: for each stripe tree the NM computes the motif ratio of its node within that tree. When it is not equal to the pre-given threshold θ, the NM makes changes to the local environment of its node in that tree so that its motif ratio improves.

For that purpose the NM make exchange operations with the node’s predecessor/successors.

The following is a pseudocode outline of the balance operation carried out by the NM of each peer p. The balance operation is repeated for each stripe tree Ti in some predefined time step.

Input: p,Ti,θ,ChildsTi(p)←{w child of pin Ti} P r ed(p)←{w predecessor ofp in Ti};

1

M1=

ChildsTi(p)

ChildsTi(p)+1

2 ;

2

M2← 0;

3

R← 1;

4

foreach w∈ChildsTi(p)do

5

NumChildsTi(w)←{number of childs ofw in Ti};

6

M2M2+NumChildsTi(w);

7

end

8

ifM26=0then RMM1

2;

9

ifR> θ then

10

requestSuccessors( pickOne(ChildsTi(p)));

11

else ifR< θ then

12

giveUpSuccessors( P r ed(p));

13

end

14

Algorithm 1: Topology Control

4.4 System Design 71

All nodes only make requests (procedures r equestSucc and g iveU pSucc) to their predeces-sors/successors and all transfers are made from successors to predecessors. This constraint guarantees that the resulting structures are indeed spanning trees as they are invariant to the transfer operations. The nodes have the right to reject requested transfers. For example when their bandwidth does not permit serving another successor, or the requested exchange operation is unfavorable to their own motif content. Figure 4.3 illustrates the two transfer operations.

Figure 4.3:Successor exchange operations.

The only exception to the local decision rule is the root, which in general always denies giving up successors and pushes its bandwidth utilization to the maximum. It requests as many successors as bandwidth is available, and allocates it uniformly over allk stripes.

The algorithm has converged when each of the stripe trees has converged. The algorithm has converged in a stripe tree when all nodes in that tree either have motif ratios equal to the threshold or no more improvements are possible due to local deadlocks.

Our approach improves the topology in each step and does not need to converge explicitly.

The trees are functional at any time, it is just their resilience that increases over time.