一句话:提出 NetBlocks DSL 与编译器,通过 staging 与布局定制层生成高性能、按需定制的网络协议栈实现。
现有 TCP/UDP 的“全有或全无”方式难以满足数据中心、IoT、AR/VR、水下机器人等多样化网络需求,而基于库的定制方案要么灵活性不足,要么性能开销显著。本文提出 NetBlocks——一种用于设计 ad-hoc 协议并生成高度优化主机网络协议栈实现的领域特定语言与编译器。用户可通过选择与定制特性来配置协议,且无需编译器背景即可扩展系统、添加新特性。其设计与实现基于 BuildIt staging 框架构建的高性能面向切面编程框架,并引入新颖的 Layout Customization Layer,在实现的同时对报文布局进行 staging,从而在可能时获得最佳性能,同时保持与现有协议层的兼容性。在数据中心与水下声学网络的三个应用上的评估表明,该方法能在延迟/吞吐与所选特性之间进行权衡,实现“用多少付多少”的性能。
Modern network applications and environments, ranging from data centers and IoT devices to AR/VR headsets and underwater robotics, present diverse requirements that cannot be satisfied by the all-or-nothing approach of TCP and UDP protocols. Network researchers and engineers need to create highly tailored protocols targeting individual problem domains. Existing library-based approaches either fall short on the flexibility in features or offer them at a significant performance overhead. To address this challenge, we present NetBlocks, a domain-specific language, and compiler for designing ad-hoc protocols and generating their highly optimized host network stack implementations. NetBlocks DSL input allows users to configure protocols by selecting and customizing features. Unlike other DSL compilers, NetBlocks also allows network researchers to extend the system and add more features easily without any prior compiler knowledge. Our design and implementation employ a high-performance Aspect-Oriented Programming framework written with the staging framework BuildIt. We also introduce a novel Layout Customization Layer that allows "staging packet layouts" alongside the implementation, which is critical for getting the best performance out of the protocol when possible, while allowing the practitioners to maintain compatibility with existing protocol layers where needed. Our evaluations on three applications ranging across deployments in data centers and underwater acoustic networks demonstrate a trade-off between performance (both latency and throughput) and selected features allowing the user to only pay-for-what-they-use.
@article{BrahmakshatriyaRGA24,
title = {NetBlocks: Staging Layouts for High-Performance Custom Host Network Stacks},
author = {Ajay Brahmakshatriya and Chris Rinard and Manya Ghobadi and Saman Amarasinghe},
journal = {Proceedings of the ACM on Programming Languages},
volume = {8},
number = {PLDI},
year = {2024},
doi = {10.1145/3656396}
}