150 likes | 256 Views
Customizable Routing with Declarative Queries. Boon Thau Loo 1 Collaborators: Joseph M. Hellerstein 1,2 , Karthik Lakshminarayanan 1 , Raghu Ramakrishnan 3 , Ion Stoica 1 1 University of California, Berkeley, 2 Intel Research Berkeley, 3 University of Wisconsin at Madison. Introduction.
E N D
Customizable Routing with Declarative Queries Boon Thau Loo1 Collaborators: Joseph M. Hellerstein1,2, Karthik Lakshminarayanan1, Raghu Ramakrishnan3, Ion Stoica1 1University of California, Berkeley, 2Intel Research Berkeley, 3University of Wisconsin at Madison
Introduction • Emerging topic in networking community. • Why is customizing routing important? • Flexibility: support different application requirements. • Evolvability of routing infrastructure. • Experimentation with new routing protocols. • Some existing solutions: • Overlay networks (multicast, RON). • Active networks. • Recent ideas: Routing as a Service, NIRA. • Use of declarative queries to express routes • Achieves a sweet-spot between expressiveness and security. • Runtime Query Optimization
End-hosts express route request as a declarative query (predicated by source(s), destination(s), duration, etc). • Query is processed in-network. • Result of Query: Entire path or establishment of state in routing infrastructure from source to destination. Route Query System Model • Routing Infrastructure • IP routers or overlay nodes • Directed graph, each link associated with a set of parameters (loss rate, available bandwidth, delay, etc) • General-purpose Query Processor • Co-located with each routing infrastructure node. • Local routing information accessible by query processor. End-host B n2 n1 End-host A
The Basics: Program Syntax • Datalog: Declarative recursive query language for graph topologies. • First Example: Network Reachability • R1: path(S,D,P,C) :- link(S,D,C), P=concatPath(link(S,D,C), nil). • R2: path(S,D,P,C) :- link(S,Z,C1),path(Z,D,P2,C2), • C=C1+C2, P=concatPath(link(S,Z,C1),P2). • Query: path(M,N,P,C) L(S,Z) S Z D p(Z,D) p(S,Z), p(S,D)
R1: reachable(S,D) :- link(S,D) R2: reachable(S,D) :- link(S,Z), reachable(Z,D) Query: reachable(M,N) The Basics: Plan Generation Ship tuples to table.field R2 R1
Query Execution l(a,b), l(a,c) a r(a,b), r(a,c) 0th Iteration R1: reachable(S,D) :- link(S,D) R2: reachable(S,D) :- link(S,Z), reachable(Z,D) Query: reachable(M,N) l(a,g), l(a,d), l(b,e) l(c,e) c b r(c,e) r(a,g), r(a,d), r(b,e) l(e,f) d l(d,f) e r(e,f) r(d,f) l(f,h) f g r(f,h) l(g,f) r(g,f) l(h,i) h r(h,i) i
Query Execution a r(a,b), r(a,c) 1st Iteration R1: reachable(S,D) :- link(S,D) R2: reachable(S,D) :- link(S,Z), reachable(Z,D) Query: reachable(M,N) l’(a,b) l’(a,c) r(b,d),r(b,e), r(b,g) c r(c,e) b l’(b,e) l’(c,e) l’(b,d) d r(d,f) e r(e,f) l’(b,g) l’(e,f) l’(d,f) l’(g,f) f r(f,h) g l’(f,h) r(g,f) h r(h,i) l’(h,i) i
Query Execution r(a,b), r(a,c),r(a,e), r(a,d), r(a,g) a 2nd Iteration R1: reachable(S,D) :- link(S,D) R2: reachable(S,D) :- link(S,Z), reachable(Z,D) Query: reachable(M,N) l’(a,b) r(b,d),r(b,e), r(b,g),r(b,f) r(c,e),r(c,f) c b l’(a,c) r(e,f),r(e,h) r(d,f),r(d,h) d e l’(b,e),l’(c,e) l’(b,d) l’(d,f), l’(g,f), l’(e,f) r(f,h), r(f,i) f g r(g,f), r(g,h) l’(b,g) r(h,i) h l’(f,h) i l’(h,i)
Path or Distance Vector • Resembles Path and Distance Vector Protocols • Computation begins with initial reachable set and shipping it to all neighbors. (DV1) • Neighbors update reachable set with its own neighborhood set, and forward resulting reachable set to neighbors. (DV2) DV1: path(S,D,D,C) :- link(S,D,C) DV2: path(S,D,Z,C) :- link(S,Z,C1), path(Z,D,W,C2), C=C1+C2 DV3: shortestLength(S,D,min<C>) :- path(S,D,Z,C) DV4: nextHop(S,D,Z,C) :- nextHop(S,D,Z,C), shortestLength(S,D,C) Query: nextHop(S,D,Z,C)
DV with Split Horizon DV1: path(S,D,D,C) :- link(S,D,C) DV2: path(S,D,Z,C) :- link(S,Z,C1), path(Z,D,W,C2), C=C1+C2, W<>S DV3: shortestLength(S,D,min<C>) :- path(S,D,Z,C) DV4: nextHop(S,D,Z,C) :- nextHop(S,D,Z,C), shortestLength(S,D,C) Query: nextHop(S,D,Z,C)
Challenges • Expressiveness • Efficiency • Stability and Robustness • Security
Expressiveness • Best-Path routing • Shortest Path • Shortest-k-paths • Least-loaded path • Disjoint-Paths greedy routing • Disjoint-k-paths (edge and node disjoint) • Dynamic Source Routing (DSR) • Policy Decision: • Paths that include/exclude certain nodes. • Do not carry/trust traffic from certain nodes.
Single-Query Optimizations • Limited Sources and/or Destinations: • Magic Sets Rewrite • Few Sources and Destinations: • Left-Right Recursion Rewrite + Magic Sets R1: reachable(S,D) :- magicSource(S), link(S,D) R2: reachable(S,D) :- reachable(S,Z), link(Z,D) R3: magicSource(b) R4: magicSource(e) Query: reachable(M,N) • Pruning unnecessary paths: Aggregate Selections
Initial Simulation Results • Optimal query plan is affected by the number of nodes participating in the same query. • Right-linear recursion is optimal for all-pairs. • Left-linear recursion lowers communication overhead for few sources and destinations. • Benefits of sharing depends on the percentage of destination nodes in queries. • Other factors include: • Presence of different queries with correlated metrics. • Network Topology
Thank You!! • For more details: • Customizable Routing with Declarative Queries. Boon Thau Loo, Joseph M. Hellerstein, Ion Stoica. HotNets-III. • Routing as a Service. Karthik Lakshminarayanan, Ion Stoica, Scott Shenker. UCB Technical Report No. UCB/CSD-04-1327, Jan 2004. • Analyzing P2P Overlays with Recursive Queries.Boon Thau Loo, Ryan Huebsch, Joseph M. Hellerstein, Timothy Roscoe, Ion Stoica. Intel Research Technical Report, IRB-TR-03-045, Nov 2003.