This repository is created for the mapreduce course of NJU. Our project is based on ns-3 quic module. After installing this module successfully, you have the ability to run our lab. Our changes to this module can be seen here.
After successfully completing the installation, you can test our simulation scripts from the ~/workspace/ns-allinone-3.27/ns-3.27 directory as follows:
mv ./src/quic/ip-cluster ./ip-cluster
mv ./src/quic/cluster-min-max-mean ./cluster-min-max-mean
mv ./src/quic/mapreduce.sh ./mapreduce.sh
sudo chmod 777 ./mapreduce.sh
- Test:
./waf --run quic-mapreduce
Repeate our lab:
./waf shell
export LD_LIBRARY_PATH=/path/to/workspace/ns-allinone-3.27/ns-3.27/build/:/path/to/workspace/ns-allinone-3.27/ns-3.27/src/quic/model/libs
(absolute path)
./mapreduce.sh > statistics
If you have successfully run these command, you will see 2 output file in ~/workspace/ns-allinone-3.27/ns-3.27 directory.(and some trace file.):
- log.txt: this file contains connection status info collected by quic server.
- statistics: this file contains statistical info of each flow.
Because there are too many changings, I only list these files path, for more details, please diff our project with original quic module.
- examples/wscript
- examples/quic-mapreduce.cc
- model/net/quic/core/congestion_control/rtt_stats.cc
- model/net/quic/core/congestion_control/rtt_stats.h
- model/net/quic/core/congestion_control/send_algorithm_interface.cc
- model/net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
- model/net/quic/core/congestion_control/tcp_cubic_sender_bytes.h
- model/net/quic/core/quic_connection.cc
- model/net/quic/core/quic_connection.h
- model/net/quic/core/quic_connection_stats.cc
- model/net/quic/core/quic_flags_list.h
- model/net/quic/core/quic_sent_packet_manager.cc
- model/net/quic/core/quic_sent_packet_manager.h
- model/net/quic/core/quic_session.cc
- model/net/quic/core/quic_spdy_session.cc
- model/net/quic/core/quic_stream.cc
- model/net/quic/core/quic_version_manager.cc
- model/net/tools/quic/quic_client_base.cc
- model/net/tools/quic/quic_client_message_loop_network_helper.cc
- model/net/tools/quic/quic_dispatcher.cc
- model/net/tools/quic/quic_dispatcher.h
- model/net/tools/quic/quic_server.cc
- model/net/tools/quic/quic_simple_dispatcher.cc
- model/net/tools/quic/quic_simple_dispatcher.h
- model/net/tools/quic/quic_simple_server.cc
- model/net/tools/quic/quic_simple_server_stream.cc
- model/net/tools/quic/quic_spdy_client_base.cc
- model/net/tools/quic/quic_spdy_client_stream.cc
- utils/quic-client.cc
- utils/quic-server.cc
This is the quic
module, which enhances the ns-3 Network Simulator with the
QUIC protocol capabilities, allowing ns-3 users
to use this transport protocol on simulations. In fact, this module adapts code
from proto-quic, a standalone library
for QUIC.
Caveat: The module and the installation have only been tested on Ubuntu 16.04.
This installation guide assumes your are working on a ~/workspace directory.
- Download NS-3 v3.27 source code from their website
- Extract the files with
tar xvjf ns-allinone-3.27.tar.bz2 ns-allinone-3.27/
- Change to directory ns-allinone-3.27/ns-3.27
- Make sure ns-3.27 compiles successfully:
- ./waf configure --enable-examples --enable-tests
- ./waf build
- If it doesn't, try downloading the ns-3-dev source code
From ~/workspace:
- git clone https://gitlab.com/diegoamc/proto-quic.git
cd proto-quic
export PROTO_QUIC_ROOT=`pwd`/src
export PATH=$PATH:`pwd`/depot_tools
./proto_quic_tools/sync.sh
./src/build/install-build-deps.sh
(debug dependencies are not needed)
From ~/workspace/ns-allinone-3.27/ns-3.27/src:
- git clone https://gitlab.com/diegoamc/ns-3-quic-module.git quic
- cd ~/workspace/ns-allinone-3.27/ns-3.27/
- ./waf clean
- ./waf configure --enable-example --enable-tests
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH/path/to/workspace/ns-allinone-3.27/ns-3.27/src/quic/model/libs (absolute path to the quic model libs)
ns-3-quic-module comes with built-in examples. Their simulation scripts can be found here.
After successfully completing the installation, you can run the examples from the ~/workspace/ns-allinone-3.27/ns-3.27 directory as follows:
./waf --run quic-example
or
./waf --run quic-example-dumbbell
Notice that both simulations have parameters that can be configured using command line arguments. For example, to configure the total number of bytes sent by the server to 1000 on quic-example, run:
./waf --run "quic-example --maxBytes=1000"
If you want to run examples that use TCP Cubic, please download TCP Cubic implementation here and follow the steps to install it.
If you just want to run the simulation scripts and don't want to configure everything, you can use the Dockerfile provided. It will basically run the commands described in the Installation section and prepare the container to run as an executable.
After installing docker
, clone this repository and change to the root directory of the project. Then build the image with:
docker build -t ns-3-quic-module .
Building the image can take a long time. The image will occupy 10.1GB from your disk space. To run the simulations, execute:
docker run -it --rm ns-3-quic-module
quic-example with the default configuration is the default simulation script. To change to another example say, quic-example-dumbbell, run:
docker run -it --rm ns-3-quic-module --run quic-example-dumbbell
And to configure simulation parameters:
docker run -it --rm ns-3-quic-module --run "quic-example --maxBytes=100"
- Yan Soares Couto (@yancouto)