PLAN: Packet Language for Active Networks Michael Hicks joint work with Jon Moore, Pankaj Kakkar, Carl Gunter, and Scott Nettles Switchware Project Computer and Information Science University of Pennsylvania
Distributed Programming for Active Networks n What is an Active Network? n Why would I want one? n How do I program one? n PLAN n Where can I get it?
Traditional Networks R R R H H H H H
R R R H H H H H
Active Networks A A A A A A A A
Why Program the Network? u Multicast u Network Searching u Congestion Avoidance u Web Caching u Switch Diagnostics and Configuration u...
Can’t I do this stuff now? n In some cases, yes, but u Evolution is slow u Programming is tedious and error-prone n In other cases, no u Many solutions require participation of all network nodes
Design Goals
Design Space Programmable Packets Dynamically Extensible Routers Endpoints only (Internet) Every hop Where to add programmability? Where to evaluate packets?
Two Level Architecture
Design Space Programmable Packets Dynamically Extensible Routers Endpoints only (Internet) Every hop Where to add programmability? Where to evaluate packets?
Ping A B
Ping in PLAN fun ping(source:host, dest:host):unit = if not thisHostIs(dest) then OnRemote(|ping|(source,dest), dest, … ) else OnRemote(|ack|(), source, … ) fun ack() : unit = print(“Success”)
PLAN: the Language n Based on simply-typed calculus n Remote evaluation with OnRemote and chunks n Access to services via function calls n Explicit, global resource bound n Exceptions and error handling n Static guarantees u Type safety u Termination
OnRemote Primitive For Remote Evaluation OnRemote(f,dest,rb,routFun) n f: function to invoke remotely + args (a chunk) n dest: remote location n rb: resource bound n routFun: routing function name
Chunks almost first-class functions n Three components: u code (optional) u function name u actual parameters n Semantics at evaluation time: u process code in fresh top-level environment u resolve function name u evaluate function with given parameters
Name Resolution n Three components: u code (optional) u function name u actual parameters n Semantics at evaluation time: u process code in fresh top-level environment u resolve function name u evaluate function with given parameters
Chunks means for encapsulation fun v(c:chunk, cs:blob): unit = if verifyCS(c,cs) then eval(c) let val c: chunk = |foo|() val d: chunk = checksum(c) in OnRemote(d,dest,getRB(),defaultRoute) end
What’s Missing? n Direct recursion u can fake it with OnRemote n General recursive types u built-in homogeneous lists + fold n Higher-order functions u can use chunks n Synchronization n Mutation u both may occur at the service level
Why not use language X? n Special domain n Simple languages for simple tasks n Lightweight interpretation n Possible a priori guarantees u type safety u memory/CPU usage u termination
PLANet n An Active Internetwork n Based on IP but all packets are PLAN programs n RIP, ARP, etc. are service-level protocols - communicate using PLAN programs
n RIP, ARP, DNS, etc. n Hard parts are implemented as services u Require state u Timing oriented u Security n Communication occurs via PLAN u Routing update broadcasts, ARP requests, etc. Service Level Protocols
Summary n Active Networks provide a richer network model u faster evolution u improved flexibility n PLAN embodies AN design space u packet programs (PLAN) u service programs (Caml) n Programming model is simple and effective
Where to get PLAN PLAN 3.1 (and PLANet) includes new security features! SwitchWare homepage (papers and code)