NAP: Programming Data Planes with Approximate Data Structures

NAP: Programming Data Planes with Approximate Data Structures
复制标题

NAP:使用近似数据结构对数据平面进行编程

DOI:
10.1145/3630047.3630196
复制
发表时间:
2023
期刊:
ACM
影响因子:
--
通讯作者:
Walker, David
Walker, David
中科院分区:
--
文献类型:
--
作者:
Pan, Mengying;Kim, Hyojoon;Rexford, Jennifer;Walker, David

文献摘要

相似文献

由于网络内存不足,许多在可编程数据平面上运行的应用程序依赖于近似数据结构。然而,使用近似数据结构进行编程是具有挑战性的,因为它需要(1)流算法方面的专业知识来选择最匹配应用程序要求的数据结构,(2)细致的配置以最小化近似误差,同时适应硬件约束,以及(3)熟练掌握低级P4语言。为了解决这些问题,我们提出了NAP,一个高层次的网络编程语言。NAP的核心是通用的近似字典抽象,它可以捕获广泛的紧凑数据结构,同时允许程序员简单地指定应用程序可以容忍的错误类型。我们通过各种网络应用程序展示了该语言的表现力、简洁性和效率,每个应用程序在不到一秒的时间内编译为Intel Tofino的P4,并且与P4输出相比,代码行数减少了25 - 50倍。我们评估了一个近似的状态防火墙写在NAP与真实的校园流量,实现性能与预测精度一致。
Many applications that run on programmable data planes rely on approximate data structures, due to insufficient in-network memory. However, programming with approximate data structures is challenging because it requires (1) expertise in streaming algorithms to select the data structures that best match an application's requirements, (2) meticulous configuration to minimize approximation error while fitting within the hardware constraints, and (3) proficiency in the low-level P4 language. To address these issues, we propose NAP, a high-level network programming language. The core of NAP is the versatile approximate dictionary abstraction that captures a wide range of compact data structures, while allowing programmers to simply specify the kinds of error an application can tolerate. We demonstrate the language's expressiveness, conciseness, and efficiency through a variety of network applications, each compiling to P4 for the Intel Tofino in less than a second and featuring 25X--50X fewer lines of code compared to the P4 output. We evaluate an approximate stateful firewall written in NAP with real campus traffic, achieving performance consistent with the predicted accuracy.