# mugurel ionut andreica, nicolae tapus politehnica university of bucharest

DESCRIPTION

Offline Algorithmic Techniques for Several Content Delivery Problems in Some Restricted Types of Distributed Systems. Mugurel Ionut Andreica, Nicolae Tapus Politehnica University of Bucharest Computer Science Department. Summary. Motivation - PowerPoint PPT PresentationTRANSCRIPT

Offline Algorithmic Techniques for Several Content Delivery Problems

in Some Restricted Types of Distributed Systems

Mugurel Ionut Andreica, Nicolae TapusPolitehnica University of Bucharest

Computer Science Department

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

2

Summary

• Motivation• Minimum Broadcast Time Strategy in Directed Tree

Networks• Minimizing Frequency Conversion Costs in

Wireless Sensor Networks Multicasts• Packet Scheduling and Ordering

– Outgoing Packet Scheduling over Multiple TCP Streams– Minimum Cost Packet Reordering

• Time Constrained Path using a Minimum Cost Rechargeable Resource

• (Constrained) Bottleneck Paths (Trees)• Conclusions

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

3

Motivation

• efficient communication – important in many domains (scientific computing, multimedia streaming, Grid file transfers)

• efficient content distribution (broadcast) strategies + communication scheduling techniques => important for efficient communication

• optimal offline techniques– of great theoretical interest– not applicable directly in a practical setting– first step towards efficient online (real-time) techniques– useful for performance evaluation of online techniques

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

4

Minimum Broadcast Time Strategy in Directed Tree

Networks (1/4)• directed tree• root node -> need to broadcast content to

the other nodes• at each time step

– each node who (already) received the content : sends the content to a node in its subtree (e.g. optical path)

• all simultaneous paths (the same time step) => vertex-disjoint

• applications to optical tree networks

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

5

Minimum Broadcast Time Strategy in Directed Tree

Networks (2/4)

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

6

Minimum Broadcast Time Strategy in Directed Tree

Networks (3/4)• dynamic programming solution• Tmin(u, step)=the minimum time required to

broadcast the message in T(u)\(T(snd(u,1))U T(snd(u,2)) U … U T(snd(u, step)))– T(u)=the subtree of vertex u– snd(u,i)=the vertex which receives the message from

vertex u at step i in the optimal strategy of broadcasting the message in T(u) (starting from u)

• step=0 (vertex=u)– binary search Tmin(u,0)– T=remaining time counter (initialized to the candidate

value)– each son s(u,j) -> a state state(s(u,j)) (initially 0)

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

7

Minimum Broadcast Time Strategy in Directed Tree

Networks (4/4)• while (T>0) and (there are sons to consider):

– consider the son s(u,x) with max. Tmin(s(u,x), state(s(u,x)) (if several, the one with the lexicographically max. sequence Tmin(s(u,x), j≥state(s(u,x)))

– if (T>Tmin(s(u,x), state(s(u,x)))• send content to s(u,x)• desconsider s(u,x) from now in

– else if (T=Tmin(s(u,x), state(s(u,x)))• send message to snd(s(u,x), state(s(u,x)))• state(s(u,x)) += 1

– else => the candidate value is too small– T--

• step>0 (vertex=u)– send the message to snd(u,j) (1≤j≤step) => set state(s(u,x))

accordingly (or ignore s(u,x), if it received a message from u previously)

– binary search Tmin(u,step) (only difference=different initial states for the sons s(u,*) + some sons ignored)

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

8

Minimizing Frequency Conversion Costs in Wireless Sensor Networks Multicasts

• multicast tree• source vertex starts sending message on a frequency from a given

set S (at most k frequencies) to the leaves (fixed receiving freq.)• each node:

– c(u,fin,fout)=the cost of converting the message from the (receiving) freq. fin to the (sending) freq. fout

– can choose the sending frequency• fixed source

– dynamic programming: Cmin(u, fin, fout)=the minimum total cost for disseminating the data from u in T(u), if u receives the message on frequency fin and sends the message further on frequency fout => O(n·k2)

• source can be selected arbitrarily– select any source : then run the algorithm above => O(n2·k2)– can do better:

• run the fixed source algo for a root r (bottom-up)• “piggy-back” the changes to parent-son relationships (when a parent p is

made the son of a previous son u, we keep it that way until we process all the vertices in T(u)) => O(n·k2) overall (for all the sources)

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

9

Outgoing Packet Scheduling over Multiple TCP Streams

• m (identical) data packets• n parallel TCP steams (sender -> destination)

– stream i: Ai packets per time unit + Bi time units back-off (waiting time)• objective: minimize time after which all the packets are sent• when all parameters are (small) integers: dynamic programming

solution– Tmin(k, c0, …, cBM-1)=the minimum time of sending k packets and the TCP

stream used from (i+1) time units ago until i time units ago was ci (0≤i≤BM-1)

– BM=max{Bi}– 2 (types of) options for each state (k, c0, ..., cBM-1)

• wait: update Tmin(k, c0’=0, c1’=c0, …, ci+1’=ci, …, cBM-1’=cBM-2)• use an available TCP stream i to send more packets: update

Tmin( min{k+Ai,m}, c0’=i, c1’=c0, c2’=c1, …, cBM-1’=cBM-2

• comparison against the “natural” greedy strategy– at each time step, send packets on an available TCP stream which can

send the most packets => wait only if no TCP stream available (only forced waits)

• exhaustive testing: m=100, n=3, Ai=0 to 4, Bi=0 to 7– 10,227 cases (out of 42,875) => DP better than greedy– 32,648 cases (out of 42,875) => DP = greedy

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

10

Minimum Cost Packet Reordering

• n packets, in the order: p(1), ..., p(n) (in the receiving buffer)• move them to the application buffer, in correct order (1,2,...,n)• application buffer=linked-list => add a packet at the front or at

the back (at any time, it contains a sequence of consecutive packets)

• move cost: c(i, pos(j, i-1))– pos(j,i) denotes the position of packet j in receiving buffer after i

moves were performed• objective: minimize aggregate cost

– aggregation function=sum or max• Cmin(i,j)=the minimum aggregate cost of obtaining in the

application buffer the sequence of packets j, j+1, …, j+i-1 after i steps => O(n2) time to compute all these values

• Cmin(n,1)=the minimum aggregate cost

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

11

Time Constrained Path using a Minimum Cost Rechargeable

Resource

• (un)directed graph G: each edge (u,v) => rc(u,v) and t(u,v)• set of rechargeable resources: cap(i), cost(i) (cap(i)<cap(j)

=> cost(i)<cost(j))• find a path from s to t with:

– minimum cost rechargeable resource– total distance ≤ Tmax

• binary search the smallest index of a feasible resource• feasibility test (index i):

– (u,w) (0≤w≤cap(i)) : vertices of an expanded graph EG– directed edge between a pair (u1, w1) and (u2, w2) in EG

• edge (u1,u2) exists in G and w2=w1-rc(u1,u2) => length=t(u1,u2)• charging_point(u1)=true, u2=u1, w2>w1 => length=tcharge(u,w1,w2)

– shortest path from (s,cap(i)) to (t,*)

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

12

(Constrained) Bottleneck Paths (Trees)

• (un)directed network• each edge (u,v): cap(u,v) and t(u,v)• find a path P (from s to t), s.t.

– total delay of the path≤Tmax

– path capacity = as large as possible• binary search the path capacity

– ignore edges with cap. < Capcand

– compute shortest path using the remaining edges (check the length agains Tmax)

• tree: source s + set of destinations D– objective: max. capacity +

• a) longest path ≤ Tmax

• b) sum of edge delays ≤ Tmax

• case a): the same algorithm; verify that shortest path to every destination ≤ Tmax

• case b): binary search + minimum spanning tree (on edges with cap(u,v)≥Capcand)

• can extend the solutions to the case where the capacities are monotonically non-increasing functions over time

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

13

Conclusions

• offline content delivery problems– broadcast in directed (optical) tree networks– multicast in wireless sensor networks– packet routing and ordering– optimal constrained paths and trees

• efficient algorithms for the discussed problems

• work – mostly theoretical in nature• practical applications

– on local parts of a (distributed) system– performance evaluation of online content delivery

strategies

Offline Algorithmic Techniques for Several Content Delivery Problems in Some

Restricted Types of Distributed Systems

14

Thank You !