Skip to content

wen-zheng/Mapreduce

Repository files navigation

Introduction

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.

RunOurLab

After successfully completing the installation, you can test our simulation scripts from the ~/workspace/ns-allinone-3.27/ns-3.27 directory as follows:

  1. mv ./src/quic/ip-cluster ./ip-cluster
  2. mv ./src/quic/cluster-min-max-mean ./cluster-min-max-mean
  3. mv ./src/quic/mapreduce.sh ./mapreduce.sh
  4. sudo chmod 777 ./mapreduce.sh
  5. 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.

Changinglist

Because there are too many changings, I only list these files path, for more details, please diff our project with original quic module.

QUIC module for ns-3

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.

Installation

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.

Install NS-3.27

  1. Download NS-3 v3.27 source code from their website
  2. Extract the files with tar xvjf ns-allinone-3.27.tar.bz2 ns-allinone-3.27/
  3. Change to directory ns-allinone-3.27/ns-3.27
  4. 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

Build proto-quic to have access to system libraries ns-3-quic-module needs

From ~/workspace:

  1. git clone https://gitlab.com/diegoamc/proto-quic.git
  2. cd proto-quic
  3. export PROTO_QUIC_ROOT=`pwd`/src
  4. export PATH=$PATH:`pwd`/depot_tools
  5. ./proto_quic_tools/sync.sh
  6. ./src/build/install-build-deps.sh (debug dependencies are not needed)

Install ns-3-quic-module

From ~/workspace/ns-allinone-3.27/ns-3.27/src:

  1. git clone https://gitlab.com/diegoamc/ns-3-quic-module.git quic
  2. cd ~/workspace/ns-allinone-3.27/ns-3.27/
  3. ./waf clean
  4. ./waf configure --enable-example --enable-tests
  5. 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)

Running ns-3-quic-module simulation examples

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.

Running with Docker

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"

Acknowledgements

  • Yan Soares Couto (@yancouto)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published