We also provide a WebRTC-based implementation for Hairpin at hairpin-webrtc.
Hairpin is built on SparkRTC ns-3 library, which provides a simulation for the real-time video communication in ns-3. It provides congestion control algorithms (GCC, NADA) and forward error correction baselines. The main functionality has been implemented in the ns3-sparkrtc repository. This repository is used to generate the parameters of Hairpin and run the experiments.
Please cite our paper if you use our simulator:
@inproceedings{nsdi2024hairpin,
title={Hairpin: Rethinking Packet Loss Recovery in Edge-based Interactive Video Streaming},
author={Meng, Zili and Kong, Xiao and Chen, Jing and Wang, Bo and Xu, Mingwei and Han, Rui and Liu, Honghao and Arun, Venkat and Hu, Hongxin and Wei, Xue},
booktitle={Proc. USENIX NSDI},
year={2024}
}
The packet can be parsed with the sparkrtc.lua in Wireshark.
sudo apt install build-essential libboost-all-dev./setup-env.shFor ns-3.33 and below, to use c++14 and above features, should configure like this: (More information: C++ standard configuration in build system (#352) · Issues · nsnam / ns-3-dev · GitLab)
LDFLAGS="-lboost_filesystem -lboost_system" ./waf configure --cxx-standard=-std=c++17To simply test if the codes can run, just run at ns-allinone-3.33/ns-3.33:
./waf --run "rtc-test --vary=1 --fecPolicy=hairpin"When the process is running, the logs can be found at ns-allinone-3.33/ns-3.33/logs/.
Usually the program will finish in around 5 minutes.
We use generate_conf_* to generate configuration files, where the files are later put into *.conf files.
For example, to run the hairpinone baseline in the WiFi traces, just run
python run_ns3.py --conf wifi-hairpinone.confrun_ns3.py is a wrapper to parallelly run ns-3 experiments over different traces and in parallel.
If you want to run a single code for debugging, copy one line from the conf file and use ns-3 command line to run it.
The process_results.py is used to process the results and generate the data to plot figures in the paper.
cd model
python fec_w_rtx.py --func offline_data -coeff 1e+00
python merge_results.py --coeff 1e+00Currently the coefficient only supports