860 likes | 1.04k Views
optimizing heterogeneous networks. David Chu Computer Science Division EECS Department UC Berkeley. Qualifying Exam UC Berkeley 16 October 2007. can a declarative approach help us cope with heterogeneous networks?. optimizing for adaptability and competing incentives.
E N D
optimizing heterogeneous networks David Chu Computer Science Division EECS Department UC Berkeley Qualifying Exam UC Berkeley 16 October 2007
can a declarative approach help us cope with heterogeneous networks?
optimizing for adaptability and competing incentives optimizing heterogeneous networks dsn: declarative sensor networks (chu-sensys07) X sdlib: sensor data library (chu-spots06) X in the field: does it help? ken: approximate data collection (chu-icde06) completed ongoing future
outline • declarative sensor networks • motivation • language & example programs • feasibility assessment • optimizing heterogeneous networks • optimizing for adaptability and competing incentives • deployment application
heterogeneous networks • … are proliferating • more demands on expert engineers • sensornets as one example…
context Sensor Networks early experiences
motivation programming sensor networks is difficult building entire sensor systems is even harder
inspiration s e n s o rn e t w o r k s network design data management
inspiration : data management • declarative is widely used in data management • relational databases • spreadsheets • abstract “what” from “how” • (Sensor-Network-As-Database) • [MFH05], [YG02]
inspiration : network design • declarative is new idea in networking • compact • flexible • analyzable, optimizable • Internet Routing, Overlays built declaratively • (the P2 project)
inspiration s e n s o rn e t w o r k s ( DSN ) network design data management
what we did • adapted declarative language • wrote declarative examples • built compiler & runtime for sensornets
brief language overview Rule1: implies don’t care join Rule2: Fact: Built-ins: builtin(temperature, ‘TemperatureImplementingModule.c’).
S C1 Z C2 D S C D a full example : tree
working programs tracking geographic routing localization tree routing multi-hop collection link estimator trickle, in-network data aggregation, beacon vector routing, pathDCS, convex hull fallback routing, right-hand rule fallback routing, …
evaluating gossip dissemination source *borrowed picture
10x6 topology 30x2 topology … from designer’s paper [LPC04] … DSN specification
evaluating tree-collection 1. tree construction 2. collection messages flow toward root *borrowed picture
evaluating tree-collection messages sent (similar performance) hop-counts
compiled size TelosB mote code space = 48KB, data space = 10KB
architectural flexibility • dsn can… • describe entire system stack • application + network + mac layers • naturally expose abstractions • freely mix and match with outside libraries
thoughts up to now… • sensor networks → data + communication • several examples of functional programs • feasible for today’s hardware platforms • can explore variety of architectures…
[current work] optimizing heterogeneous networks
outline • declarative sensor networks • optimizing heterogeneous networks • motivation • dimensions for optimization • execution space by example • finding optimal • optimizing for adaptability and competing incentives • deployment application
the protocol problem • above: workloads vary • below: greater diversity of networks • who is going to figure out the best protocol for your situation? • protocol optimization has a long history [CDO97], [VLC88], [HA89],…
implications of declarative • concise “what” programming • 1 specification, N possible execution plans ü ?
Planner Optimized execution strategy Network protocol specification • Environment • Workload • Network characteristics Cost criteria
manually engineering solutions • packet filtering • offload to resource-rich gateways • content distribution networks • manual configuration of distribution points • session state • explicitly choose stateless variants when critical • quality of service • choose tradeoff between node state or packet state • routing • domain-specific protocols e.g. DSR, 6lowpan • distributed event detection • configure detector placement design parameters: state, rendezvous?
toward automated solutions • identify possible executions of program • search execution space for optimal plan • but first some rough idea of what we’re after… Planner
packet filter program % forwarding rule message(@Next,Src,Dest,Load) :- message(@Crt,Src,Dest,Load), nexthop(@Crt,Dest,Next). % firewall rule receive(@Crt,Src,Dest,Load) :- message(@Crt,Src,Dest,Load), Crt == Dest, firewall(@Crt,Load). % query receive(@Crt,Src,Dest,Load)? base relation recursive relation non-recursive relation
f e d b a c g base relation as table partitioned across nodes
f e d b a c g base relation as network graph
f e d b a c g
A M B msg() facts M N D M N nexthop() facts E M N
r A f B D E
A B r f D E
f 9 e d b 8 9 a 10 2 c g 1 varying join selectivity shifts the optimal rendezvous 1: Meet-In-The-Middle (MiM) Rewrite applications: packet filtering, event detection, CDNs
HiResVideo EventDetectorFlag f = + e d b a c g 2: Query Scramble Rewrite applications: query scrambling, mitigating latency X bandwidth
f + = e d b a c g allowed ports allowed options 3: Semijoin Rewrite application: semijoin
f , e d b a c g Two separate relations at endpoint. 3b: Traditional Join Placement application: semijoin
f e d b a c g
f e d b a c g 4: Pullback Rewrite application: alternate between DVR and SR
f e d b a c g 4: Pullback Rewrite application: alternate between DVR and SR
routing layer state proxying distance vector routing source route to D C: D via D C: D via D A: D via B B: D via C C A B D Sensornet Internet nexthop forwarding table 4: Pullback Rewrite example
M M L regular L’ M’ A A A C C C M’,L’ M’,L’ M,L M,L M,L stateless B B B M L proxy L’ M’ 5: SessionState Rewrite
… M’ B M’ L’ C L M B M 5: SessionState Rewrite application: pushing state into packets/proxies A M
… B C M,L M,L M’,L’ M’,L’ M,L B 5: SessionState Rewrite application: pushing state into packets/proxies A L0
… M’ L’ defer write B prefetch read C M,L M’,L’ M,L L B M 5: SessionState Rewrite application: pushing state into packets/proxies A M