Merlin : Programming the Big Switch

Software-defined networking (SDN) enables programmers to treat an entire network as a single switch that forwards traffic between its outward-facing ports [5]. The “big switch” abstraction presents programmers with a global view of the network that hides the complexities inherent in the physical network, such as distributed state, complicated forwarding rules, and device-specific configuration. But while this abstraction is appealing, an important question remains: how do we effectively program a big switch? Existing SDN programming languages [2, 7, 9, 1, 8] suffer from limitations that make them unable to adequately capture the big switch abstraction—they either focus exclusively on forwarding, or they force programmers to express policies in terms of hop-by-hop functions. Furthermore, none of these languages allow programmers to write policies that specify when richer functions (perhaps implemented using middleboxes) should be applied to packets. This paper presents Merlin, a new network programming language with three key features that are designed to address the essential aspects of big switch programming: (i) predicates divide multiple classes of traffic over several sub-policies; (ii) path expressions give precise control over forwarding; and (iii) traffic constraints provide bandwidth limits and minimum guarantees. The Merlin compiler maps high-level policies into a constraint problem that statically determines the allocations of network-wide resources such as paths and bandwidth. The Merlin run-time system allows those allocations to be dynamically adjusted, and provides mechanisms for verifying that updated allocations obey the constraints expressed in the original policy.