NetStar: A Future/Promise Framework for Asynchronous Network Functions

Network functions (NFs) are more than simple packet processors that apply various transformations to the packet content. Modern NFs often resort to various external services to achieve their purposes, e.g., storing flow states in an external storage or looking up a DNS. Working with external services is usually implemented using callback-based asynchronous programming, which is complex and error-prone. This paper proposes NetStar, a new NF programming framework that brings the future/promise abstraction to the NF dataplane for flow processing. NetStar simplifies asynchronous NF programming via a carefully designed async-flow interface that exploits the future/promise paradigm by chaining multiple continuation functions for asynchronous operations handling. The programs implemented using the NetStar framework mimic simple synchronous programming but are able to achieve full flow processing asynchrony. We have used NetStar to implement a number of representative NFs. Our experience and evaluation results show that NetStar can effectively simplify asynchronous NF programming by substantially reducing the lines of code, while still approaching line-rate packet processing speeds.

[1]  Aditya Akella,et al.  OpenNF: enabling innovation in network function control , 2015, SIGCOMM 2015.

[2]  Eunyoung Jeong,et al.  mTCP: a Highly Scalable User-level TCP Stack for Multicore Systems , 2014, NSDI.

[3]  Scott Meyers,et al.  Effective modern C++: 42 specific ways to improve your use of C++11 and C++14 , 2014 .

[4]  Koen Claessen,et al.  A poor man's concurrency monad , 1999, Journal of Functional Programming.

[5]  Hyeontaek Lim,et al.  MICA: A Holistic Approach to Fast In-Memory Key-Value Storage , 2014, NSDI.

[6]  Tarik Taleb,et al.  Towards Edge Slicing: VNF Placement Algorithms for a Dynamic & Realistic Edge Cloud Environment , 2017, GLOBECOM 2017 - 2017 IEEE Global Communications Conference.

[7]  Scott Shenker,et al.  NetBricks: Taking the V out of NFV , 2016, OSDI.

[8]  Peng Li,et al.  Combining events and threads for scalable network services implementation and evaluation of monadic, application-level concurrency primitives , 2007, PLDI '07.

[9]  Tarik Taleb,et al.  Efficient virtual evolved packet core deployment across multiple cloud domains , 2018, 2018 IEEE Wireless Communications and Networking Conference (WCNC).

[10]  Tarik Taleb,et al.  Conformal Mapping for Optimal Network Slice Planning Based on Canonical Domains , 2018, IEEE Journal on Selected Areas in Communications.

[11]  Dongsu Han,et al.  mOS: A Reusable Networking Stack for Flow Monitoring Middleboxes , 2017, NSDI.

[12]  Don Syme,et al.  The F# Asynchronous Programming Model , 2011, PADL.

[13]  Kennedy Kambona,et al.  An evaluation of reactive programming and promises for structuring collaborative web applications , 2013 .

[14]  Andrew Warfield,et al.  Split/Merge: System Support for Elastic Execution in Virtual Middleboxes , 2013, NSDI.

[15]  Franck Le,et al.  Stateless Network Functions: Breaking the Tight Coupling of State and Processing , 2017, NSDI.

[16]  Tarik Taleb,et al.  Towards Modeling Cross-Domain Network Slices for 5G , 2018, 2018 IEEE Global Communications Conference (GLOBECOM).

[17]  George Varghese,et al.  P4: programming protocol-independent packet processors , 2013, CCRV.

[18]  Scott Shenker,et al.  Elastic Scaling of Stateful Network Functions , 2018, NSDI.

[19]  Tarik Taleb,et al.  Service-aware network function placement for efficient traffic handling in carrier cloud , 2014, 2014 IEEE Wireless Communications and Networking Conference (WCNC).

[20]  Ashish Gupta,et al.  The RAMCloud Storage System , 2015, ACM Trans. Comput. Syst..

[21]  Ivan Beschastnikh,et al.  Don't Call Us, We'll Call You: Characterizing Callbacks in Javascript , 2015, 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM).

[22]  Vyas Sekar,et al.  A High Performance Packet Core for Next Generation Cellular Networks , 2017, SIGCOMM.

[23]  Jérôme Vouillon,et al.  Lwt: a cooperative thread library , 2008, ML '08.

[24]  Tarik Taleb,et al.  Coalitional Game for the Creation of Efficient Virtual Core Network Slices in 5G Mobile Systems , 2018, IEEE Journal on Selected Areas in Communications.

[25]  Tarik Taleb,et al.  User mobility-aware Virtual Network Function placement for Virtual 5G Network Infrastructure , 2015, 2015 IEEE International Conference on Communications (ICC).