declarative routing
play

Declarative Routing: Extensible Routing with Declarative Queries - PowerPoint PPT Presentation

Declarative Routing: Extensible Routing with Declarative Queries Boon Thau Loo 1 Joseph M. Hellerstein 1,2 , Ion Stoica 1 , Raghu Ramakrishnan 3 , 1 University of California at Berkeley, 2 Intel Research Berkeley, 3 University of Wisconsin-Madison


  1. Declarative Routing: Extensible Routing with Declarative Queries Boon Thau Loo 1 Joseph M. Hellerstein 1,2 , Ion Stoica 1 , Raghu Ramakrishnan 3 , 1 University of California at Berkeley, 2 Intel Research Berkeley, 3 University of Wisconsin-Madison

  2. Motivation Lack of extensibility and flexibility in today’s Internet routing Hard to add/improve/update routing protocols

  3. Two “Extremes”: Our Goal “Hard-coded” protocols: Active Networks - Efficiency, safety - Flexibility, evolvability + + - Flexibility, evolvability - Safety, efficiency - - Declarative Routing: + Flexibility, evolvability, safety Restricted instantiation of Active Networks for the control plane

  4. Key Idea Recursive query language for expressing routing protocols: � Datalog: a declarative recursive query language � Well-researched in the database community � Well-suited for querying properties of graphs

  5. Advantages Expressiveness: Compact and clean representation of protocols Safety: Datalog has desirable safety properties on termination Efficiency: No fundamental overhead when executing standard protocols.

  6. Usage Scenarios ISP administrators � Run different protocols for different nodes � Modify existing protocols in routers End-hosts � Set up customized routes for different quality-of-service and policy requirements of applications

  7. Roadmap Execution Model Introduction to Datalog Path-Vector Protocol Example Advantages: � Expressiveness � Safety � Efficiency Evaluation

  8. Centralized Execution Model Store entire network state into a centralized database Issue Datalog queries on the centralized database for customized routes

  9. Distributed Execution Model Query Processor Routing Datalog Derived Result Input Output Tuples Tuples Queries Tables Protocol Tables Neighbor Table Forwarding updates Table updates Neighbor Table Forwarding Table Routing Infrastructure Routing Infrastructure Node Declarative Routing Traditional Routers

  10. Introduction to Datalog Datalog rule syntax: <head> ← <precondition1>, <precondition2>, … , <preconditionN>.

  11. All-Pairs Reachability R1: reachable(S,D) ← link(S,D) R2: reachable(S,D) ← link(S,Z), reachable(Z,D) “For all S,D, link(a,b) – “there is a link from node a to node b ” If link(S,D) exists, generate reachable(S,D)” reachable(a,b) – “node a can reach node b ” “For all nodes S,D, If there is a link from S to D, then S can reach D”. Input: link(source, destination) Output: reachable(source, destination)

  12. All-Pairs Reachability R1: reachable(S,D) ← link(S,D) R2: reachable(S,D) ← link(S,Z), reachable(Z,D) “For all S, D and Z, If link(S,Z) exists AND reachable(Z,D) exists, generate reachable(S,D).” “For all nodes S,D and Z, If there is a link from S to Z, AND Z can reach D, then S can reach D”. Input: link(source, destination) Output: reachable(source, destination)

  13. All-Pairs Reachability R1: reachable(S,D) ← link(S,D) R2: reachable(S,D) ← link(S,Z), reachable(Z,D) Query: reachable(M,N) All-Pairs link link link Input table: S D S D S D a b b c c d a b c d reachable reachable reachable Output table S D S D S D (Round 1): c d a b b c E.g. R1: reachable(b,c) ← link(b,c)

  14. All-Pairs Reachability R1: reachable(S,D) ← link(S,D) R2: reachable(S,D) ← link(S,Z), reachable(Z,D) Query: reachable(M,N) link link link Input table: S D S D S D a b b c c d a b c d reachable reachable reachable Output table S D S D S D (Round 2): c d a b b c a c b d R2: reachable(b,d) ← link(b,c), reachable(c,d)

  15. All-Pairs Reachability R1: reachable(S,D) ← link(S,D) R2: reachable(S,D) ← link(S,Z), reachable(Z,D) Query: reachable(M,N) link link link Input table: S D S D S D a b b c c d a b c d reachable reachable reachable S D S D S D Output table Recursive queries are natural for Recursive queries are natural for (Round 3): c d a b b c querying graph topologies querying graph topologies a c b d a d

  16. Roadmap Execution Model Introduction to Datalog Path-Vector Protocol Example � Distributed Datalog � Execution Plan � Protocol Advantages: � Expressiveness � Safety � Efficiency Evaluation

  17. Distributed Datalog R1: reachable(S,D) ← link(S,D) R2: reachable(S,D) ← link(S,D), reachable(Z,D) Query: reachable(M,N) link link link Input table: S D S D S D b c a b c d a b c d reachable reachable reachable S D S D S D Output table: c d b c a b b d a c a d

  18. Path Vector Protocol Example R1: path(S,D,P) ← link(S,D), P=(S,D). ← link(Z,S), path(Z,D,P 2 ), R2: path(S,D,P) P=S+P 2 . Query: path(S,D,P) Input: link(source, destination) Query output: path(source, destination, pathVector)

  19. Datalog � Execution Plan R1: path(S,D,P) ← link(S,D), P=(S,D). ← link( Z ,S), path( Z ,D,P 2 ), R2: path(S,D,P) P=S+P 2 . Matching variable Z = “Join” Recursion Pseudocode at node Z: while (receive<path(Z,D,P 2 )>)) { while (receive<path(Z,D,P2)>)) { R2 Send for each neighbor S { link.S=path.S for each neighbor S { path.S newpath = path(S,D,S+P2) newpath = path(S,D,S+P 2 ) send newpath to neighbor S } send newpath to neighbor S } R1 link(S,D) path(S,D,P) } }

  20. Send R2 Query Execution path.S link.S=path.S R1 R1: path(S,D,P) ← ← link(S,D), P=(S,D). ← ← link(S,D) path(S,D,P) R2: path(S,D,P) ← link(Z,S), path(Z,D,P 2 ), P=S+P 2 . Query: path(S,D,P,C) link link link link Neighbor S D S D S D S D table: b c c b a b d c b a c d a c d b path path path Forwarding S S D D P P S S D D P P S D P S D P table: a b (a,b) b c (b,c) c d (c,d)

  21. R2 path.S Query Execution link.S=path.S R1 R1: path(S,D,P) ← link(S,D), P=(S,D). path(S,D,P) link(S,D) R2: path(S,D,P) ← ← ← ← link(S,Z), path(Z,D,P 2 ), P=S+P 2 . Query: path(S,D,P,C) link link link link Neighbor S D S D S D S D table: b c a b c b d c b a c d a b c d p(a,c,[a,b,c]) p(b,d,[b,c,d]) path path path Forwarding S S D D P P S S D D P P S D P table: a a b b (a,b) (a,b) b b c c (b,c) (b,c) c d (c,d) a c (a,b,c) b d (b,c,d)

  22. R2 path.S Query Execution link.S=path.S R1 R1: path(S,D,P) ← link(S,D), P=(S,D). link(S,D) path(S,D,P) R2: path(S,D,P) ← ← ← ← link(S,Z), path(Z,D,P 2 ), P=S+P 2 . Query: path(S,D,P,C) link link link link Neighbor S D S D S D S D table: b c a b c b d c b a c d a d b c p(a,d,[a,b,c,d]) path path path Forwarding S D P S D P S D P S D P Communication patterns are identical to Communication patterns are identical to table: a b (a,b) a b (a,b) c d (c,d) b c (b,c) those in the actual path vector protocol a c (a,b,c) those in the actual path vector protocol a c (a,b,c) b d (b,c,d) a d (a,b,c,d)

  23. Roadmap Execution Model Introduction to Datalog Path-Vector Protocol Example � Distributed Datalog � Execution Plan � Protocol Advantages: � Expressiveness � Safety � Efficiency Evaluation

  24. Expressiveness Best-Path Routing Minor variants give Distance Vector many options! Dynamic Source Routing Policy Decisions QoS-based Routing Link-state Multicast Overlays (Single-Source & CBT)

  25. Expressiveness All-pairs all-paths: R1: path(S,D, ,C) ← link(S,D,C) P , P=(S,D). R2: path(S,D, ,C) ← P link(S,Z,C 1 ), path(Z,D, ,C 2 ), P 2 C=C 1 +C 2 , P=S+P 2 . Query: path(S,D, ,C) P

  26. Expressiveness Best-Path Routing: R1: path(S,D,P,C) ← link(S,D,C), P= (S,D). R2: path(S,D,P,C) ← link(S,Z,C 1 ), path(Z,D,P 2 ,C 2 ), C=C 1 +C 2 , P= S+P 2 . R3: bestPathCost(S,D,min<C>) ← path(S,D,Z,C) R4: bestPath(S,D,Z,C) ← bestPathCost(S,D,C), path(S,D,P,C) Query: bestPath(S,D,P,C)

  27. Expressiveness Best-Path Routing: R1: path(S,D,P,C) ← link(S,D,C), P= (S,D). R2: path(S,D,P,C) ← link(S,Z,C 1 ), path(Z,D,P 2 ,C 2 ), C=FN(C 1 ,C 2 ), P=S+P 2 . R3: bestPathCost(S,D,AGG<C>) ← path(S,D,Z,C) R4: bestPath(S,D,Z,C) ← bestPathCost(S,D,C), path(S,D,P,C) Query: bestPath(S,D,P,C) Customizing C, AGG and FN: lowest RTT, lowest loss rate, highest available bandwidth, best-k

  28. Expressiveness All-pairs all-paths: R1: path(S,D, ,C) ← link(S,D,C) P , P=(S,D). R2: path(S,D, ,C) ← P link(S,Z,C 1 ), path(Z,D, ,C 2 ), P 2 C=C 1 +C 2 , P=S+P 2 . Query: path(S,D, ,C) P

  29. Expressiveness Distance Vector: R1: path(S,D, ,C) ← link(S,D,C) D R2: path(S,D, ,C) ← link(S,Z,C 1 ), path(Z,D, W Z ,C 2 ), C=C 1 +C 2 R3: shortestLength(S,D,min<C>) ← path(S,D,Z,C) R4: nextHop(S,D,Z,C) ← nextHop(S,D,Z,C), shortestLength(S,D,C) nextHop Z Query: (S,D, ,C) Count to Infinity problem?

  30. Expressiveness Distance Vector with Split Horizon: R1: path(S,D,D,C) ← link(S,D,C) R2: path(S,D,Z,C) ← link(S,Z,C 1 ), path(Z,D,W,C 2 ), C=C 1 +C 2 , W!=S R3: shortestLength(S,D,min<C>) ← path(S,D,Z,C) R4: nextHop(S,D,Z,C) ← nextHop(S,D,Z,C), shortestLength(S,D,C) Query: nextHop(S,D,Z,C)

Recommend


More recommend