[1/24] 1 compact routing with minimum stretch kei takahashi

24
1 [1/24] Compact Routing with Minimum Stretch Kei Takahashi

Upload: vincent-pope

Post on 18-Jan-2018

230 views

Category:

Documents


0 download

DESCRIPTION

[3/24] 3 Routing tables  A routing table knows the next hop to each node  The information need not be optimal  Stray messages can be rerouted at relay nodes  There are trade-off of the table size and efficiency  A complete routing table occupies large memory  Efficient routing is not always possible with partial routing tables V0 V1 V2 V3 V1 : Port 0 V2 : Port 1 V3 : Port 1 V1 : Port 0 V2 : Port 1 V3 : Port 1 Port 1 Port 0 Message To V3 V0 : Port 0 V1 : Port 1 V3 : Port 2 V0 : Port 0 V1 : Port 1 V3 : Port 2 Port 0 Port 1 Port 2

TRANSCRIPT

Page 1: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

1

[1/24]

Compact Routingwith Minimum StretchKei Takahashi

Page 2: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

2

[2/24]

Introduction In distributed networks, message relaying is

inevitableAll-to-all connections are physically impossibleNodes can dynamically appear, move, and disappear

Some routing tactics are possibleBroadcastRandom relaying Routing table

V0

V1

V2

V3

MessageTo V3

Page 3: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

3

[3/24]

Routing tables A routing table knows the next hop to each node The information need not be optimal

Stray messages can be rerouted at relay nodes There are trade-off of the table size and efficiency

A complete routing table occupies large memory Efficient routing is not always possible with partial routing tables

V0

V1

V2

V3

V1 : Port 0V2 : Port 1V3 : Port 1

Port 1Po

rt 0

MessageTo V3

V0 : Port 0V1 : Port 1V3 : Port 2

Port 0

Port 1 Port 2

Page 4: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

4

[4/24]

Naïve (complete) routing Each node holds the next hop to all nodes

Always assures optimal routing Table size is O(n log(n)) at each node

n : number of nodes size(table) = size(column) * (n-1) size(column) = size(nodename) + size(portname)

≤ O(log(n))

V0

V1 : Port 0V2 : Port 1V3 : Port 1V4 : Port 0V5 : Port 1V6 : Port 1…

Port 1Port 0

n-1

log(n)

Page 5: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

5

[5/24]

The proposed method Table size ≤ O(n2/3 log4/3 (n))

Better than O(n log(n)) in the naïve method In most cases, table is smaller than this bound

Maximum stretch ≤ 3Transfer cost is 3 times more than optimal case In most cases, the cost is smaller

V0

V1

V2

54

6Stretch = 2

Cost =

5 Cost = 10

Page 6: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

6

[6/24]

Agenda Introduction Problem definition Basic Idea

Landmarks Re-labeling Routing

Details Selecting landmarks Constructing Routing tables

Proofs Table size Max stretch < 3

Conclusion

Page 7: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

7

[7/24]

Problem definition Nodes are connected with undirected edges having weight Node names can be relabeled as long as length ≤ O(log(n))

Hostname, IP, processor number It is freely changed in programs

Edges are identified with “port name” Port names differ in each node, and cannot be relabeled

“Port” is something like a UNIX socket

V0

V1

V2

V3

A303

A302

A300

A301

Port 1Po

rt 0

Port 0

OKPort V2

Port

V1NG Port 1

Port 2

Page 8: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

8

[8/24]

Basic idea (1) : landmarks Select global “Landmarks”

They are near to many neighbor nodes Each node sets its own landmark as nearest one

Routing tables have columns for… On landmarks : other landmarks (no entry for neighbors) On the other nodes : landmarks and neighbors whose shortest path

to their landmark goes through that node In case of v0, v1 applies to this criteria

v1

v3v2 v4

v6v5

v8v7

v10v9 v11

v13v12Landmark

Landmark

V3        :V10       :--------------V1 :

Landmarks

label port

Near nodes

v0

Page 9: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

9

[9/24]

V3 :V10 :--------------V1 :

Basic idea (2) : re-labeling Re-label node names

v → (v, lv, elv(v)) lv : Ladmark of velv(v) : Next-hop from lv to v

In a natural way, elv(v) is written in the routing table of lv, but then routing table of lv gets larger

v1v0

v3v2 v4

v6v5

v10

v8v7

v9 v11

v13v12v12,v10

v13,v10

v11,v10

v9,v10

v10,v10

-

v7,v10

v8,v10(V3, V3, -):

(V10,V10,-):--------------(V1,V3,) :

v3,v3

-

v0,v3

v1,v3

v2,v3

v4,v3

v5,v3

v6,v3

Landmarks

Near nodes

label port

Page 10: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

10

[10/24]

Basic idea (3) : routing algorism The node u routes a message to (v, lv, elv(v)) as follows:

if u == lv : send to elv(v) if v is in u’s table: send according to the table otherwise: send to its landmark (lv)’ s next hop

Let’s see the node (v0, v3, ↑) in the following figure (v1,v3,↓) : check the table and send to → (v12, v10, ↓) : try to send to (v10,v10,-)

v1,v3

v0,v3

v3,v3

-v2,v3

v6,v3

v6,v3

v5,v3

v10,v10

-

v8,v10

v7,v10

v9,v10

v11,v10

v13,v10

v12,v10

(v3, v3, -):(v10,v10,-):--------------(v1,v3,) :

Page 11: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

11

[11/24]

An example of routing

A message from (v0, v3, ↑) to (v12, v10, ↓) (v0, v3, ↑) Checks the entry of landmark (v10,v10,-) : ↓ (v3, v3, -) Checks the entry of landmark (v10,v10,-) : → (v6, v3, →) Checks the entry of landmark (v10,v10,-) : → (v9, v10, ←) Checks the entry of landmark (v10,v10,-) : → (v10, v10, -) Checks the label of the destination :↓ (v13, v10, ↓) Checks the entry of (v12, v10, ↓) : ← (v12, v10, ↓) Finally receives the message

Longer than optimal, but stretch < 3

v1,v3

v0,v3

v3,v3

-v2,v3

v6,v3

v6,v3

v5,v3

v10,v10

-

v8,v10

v7,v10

v9,v10

v11,v10

v13,v10

v12,v10 Obtained route

Optimal route

Page 12: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

12

[12/24]

高速道路のアナロジー Naïve routing : 全ての目的地が全ての案内板に書かれている

現実的に不可能 インターチェンジをランドマークにする

あらゆるインターチェンジまでの経路は全ての案内板に書く インターチェンジの案内板には何も書かれていない

柏キャンパスを「柏インターを北」と覚える (柏キャンパス , 柏インター , 北 )と re-labeling

遠くからのルーティング 「柏インター」を目指して、案内板に沿って進む 柏インターを北に進むと、柏キャンパスが載った案内板が出現する

柏の近くからは、柏インターを経由せず到達できる

Page 13: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

13

[13/24]

Agenda Introduction Problem definition Basic Idea

Landmarks Re-labeling Routing

Details Selecting landmarks Constructing Routing tables

Proofs Table size Max stretch < 3

Conclusion

Page 14: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

14

[14/24]

Dijkstra algorithm Gives shortest ways from one node to every node

in an undirected graph For each reachable node, calculate min-cost Take one node having min-cost The adding can be stopped, then the n-nearest

subset is obtained → truncated-Dijkstra method

V1 V3

V0

V21

1 3

From v2Costs : {v1 => 1, v3 => 3}Take v1Costs : {v0 => 2, v3 => 3}Take v0Costs : {v3 => 3}Take v3

4

Page 15: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

15

[15/24]

Neighbors set

Neighbors set (Bv) : reachable from vSort the nodes according to the cost from v

(if some costs are the same, sort by their name label)Take nα nodes from the nearest one → Bv (v’s ball)

Reversed-neighbors set (Rv) : reachable to vA set of nodes which have v as their neighbor

Rv ← {y | y B∈ v}

V1 V3

V0

V21

1

23

Bv Rv

v0 v0, v1 ,v2 v0, v1,v2

v1 v0, v1, v2 v0, v1, v2, v3

v2 v0, v1, v2 v0, v1, v2, v3

v3 v1, v2, v3 v3

nα = 3

Page 16: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

16

[16/24]

Requirements for landmarks

A) Only a limited number of nodes can be landmarks They should be close to many other nodes Adding landmarks makes every routing table bigger

B) If v is on the way from many nodes to their landmark, v should be their landmark instead Otherwise the table on v is too big

v2 v4

v6v5

v8v7

v10v9 v11

v13v12

v0V3        :

v3

v1

Not suitable for a landmarkV10       :--------------V0 :V1 :V2 :V4 :V5 :V6 :

Page 17: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

17

[17/24]

A) Landmarks should be famous

Choose “famous” nodes from set of Bvs → DEasily reached from any v

∃D V such that⊂ |D| = O(n1-α log n) ∀v V , D ∩ B∈ v ≠ φ

An algorithm is known to obtain D(called Extending dominating set”)

V1 V3

V0

V21

1

23

Bv Rv

v0 v0, v1 ,v2 v0, v1,v2

v1 v0, v1, v2 v0, v1, v2, v3

v2 v0, v1, v2 v0, v1, v2, v3

v3 v1, v2, v3 v3

nα = 3V = {v0, v1, v2, v3}D = {v2}|D| = 1Bv0 ∩ D = v2Bv1 ∩ D = v2Bv2 ∩ D = v2Bv3 ∩ D = v2

Page 18: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

18

[18/24]

B) Famous nodes should be landmarks

∃C V such that⊂ ∀c C , |Rc| ∈ ≥ n(1+α)/2

C is easy to be computed when Rv is given C always satisfies

|C| ≤ O(n(1+α)/2)Σ( v V)∀ ∈ Rv = n*nα ≥ Σ( c C)∀ ∈ Rc

V1 V3

V0

V21

1

23

Bv Rv

v0 v0, v1 ,v2 v0, v1,v2

v1 v0, v1, v2 v0, v1, v2, v3

v2 v0, v1, v2 v0, v1, v2, v3

v3 v1, v2, v3 v3

nα = 3V = {v0, v1, v2, v3}C = {v1, v2}Rv1 = 4 > 3.6 = n(1+α)/2

Rv2 = 4 > 3.6 = n(1+α)/2

Page 19: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

19

[19/24]

Selecting landmarks Two sets are obtained

∃D V such that⊂ |D| = O(n1-α log n) ∀v V , D ∩ B∈ v ≠ φ

∃C V such that⊂ ∀c C , |Rc| ∈ ≥ n(1+α)/2

C always satisfies |C| ≤ O(n(1+α)/2)

Landmark set is derived by simply joining them L = C D∪ L = O(n1-α log n) + O(n(1+α)/2)

V1 V3

V0

V21

1

23

Bv Rv

v0 v0, v1 ,v2 v0, v1,v2

v1 v0, v1, v2 v0, v1, v2, v3

v2 v0, v1, v2 v0, v1, v2, v3

v3 v1, v2, v3 v3 Landmarks

Page 20: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

20

[20/24]

Constructing routing tables// Calculate paths to nα-shortest nodes from v For each v V, perform truncated-Dijkstra(n∈ α)

// Here, less than nα nodes are nearer than u from vFor each u reached from v:

// If ↓ is true, the best route is given by using that landmarkIf no landmark is on the path from v to u:

store(v, eu(v)) at u

// Calculate shortest paths from landmarks to every nodeFor each l L, perform full-Dijkstra(n∈ α)

// v appearedFor each v V∈

Store (l, eu(l)) at u

Page 21: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

21

[21/24]

Proof : table size = O(n2/3 log4/3 (n))

n nα # landmarks Table size Naïve method (α=1)

1000 36 190 1315 6907

10000 94 972 8961 92103

100000 236 4864 56007 1151292

1000000 575 23995 331504 13815510

A set of landmarks (L) is O(n1-α log n + n(1+α)/2) Table size = size(label of node) * size(columns)

Size(label of node) = O(log(n)) Size(columns) ≤ |L| + nα = O(n1-α log n + n(1+α)/2 + nα)

∴ Table size = O((n1-α log n + n(1+α)/2 + nα) log n) Search α which minimizes table size, and get

α = 1/3 + (2 log log n) / (3 log n)Table size = O(n2/3 log4/3 (n))

Page 22: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

22

[22/24]

Proof : max stretch ≤ 3 Theorem : route(u, v) ≤ 3 * d(u, v)

route(u,v) : the cost of the route from u to v given by this algorism d(u,v) : the smallest cost from u to v L : set of landmarks X : points on the shortest path among u and v

If d(u,v) < d(lv, v): d(x, v) < d(u, v) < d(lv, v) lv Bv, so (u Bv) and (v Ru) and ( x X, x Bv, x Ru)∈ ∈ ∈ ∀ ∈ ∈ ∈ X ∩ L = φ

Otherwise v should take that node as lv ( )⊥ Then, u should have (v, eu(v)) on its routing table, so as x∀ The message will not pass lv ( )⊥

(As a result, route(u, v) is always optimal in this case)

u lv

vx

Page 23: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

23

[23/24]

Proof : max stretch ≤ 3 (Cont.) Otherwise : d(lv,v) ≤ d(u,v)

Column (v, eu(v)) is not on u’s table Otherwise (v Ru) so any x’s table has a column(v, ex(v))∈ The message will not pass lv ( )⊥

Y : nodes on the shortest path among u and lv If any y does not have a column (v, ey(v)) on its table :

route (u, v) = d(u, lv) + d(lv, v) Every y refers the column for lv, which gives the shortest path to lv

d(u,lv) ≤ d(u, v) + d(lv, v) (triangle equation) d(u,lv) ≤ 2 * d(u, v), so route(u,v) ≤ 2 * d(u,v) + d(u,v) ≤ 3 * d(u,v)

Otherwise : (skip) (It can be proved that route(u,v) ≤ d(u, lv) + d(lv, v) )

u lv

vx

y

Page 24: [1/24] 1 Compact Routing with Minimum Stretch Kei Takahashi

24

[24/24]

Conclusion A routing strategy was given which assures

Small table size : O(n2/3 log4/3 (n)) Max stretch is less than 3

It consists of 4 parts: Selecting landmarks Re-labeling nodes Create routing tables Routing algorism

For practical situations, alternative methods are proposed. They offer smaller table size and better routing on average