Giter Club home page Giter Club logo

offloading's Introduction

Environment created for the paper: "Impact of User Privacy and Mobility on Edge Offloading"

The environment was tested in Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. Although it may work on some other Debian-based Linux distributions, we do not guarantee that all features will work well.

Getting started

These instructions will guide you to get the environment up and running.

Installing the prerequisites

sudo apt update
sudo apt install python python3 python3-pip git
pip3 install --upgrade pip
python3 -m pip install argparse numpy scipy qif pandas gdown

It is also necessary to install SUMO:

  1. Please refer to the official SUMO documentation on how to install it, we recommend the separate PPA version.
  2. Run the SUMO Linux build.

Cloning the repository

git clone https://github.com/LABORA-INF-UFG/Offloading.git

Environment

Here we detail our environment. Please enter the Scripts/ directory before running each script.

Generating mobility traces with SUMO

The script we created provide a plethora of options in order to generate the mobility traces that best fit your scenarios.

You can create the mobility traces by running the following script combined with the arguments:

python3 genSUMOtraces.py -c -b -p -sh sumoHomeLocation -st sumoToolsLocation -rl resultsLocation -ng numberOfGrids -gl gridLength -sd simulationDururation -step simulationStep -nc numberOfCars -nb numberOfBuses -np numberOfPedestrians -s seed

Where:
       -c (flag) – A flag that indicates that you want to simulate cars.
       -b (flag) – A flag that indicates that you want to simulate buses.
       -p (flag) – A flag that indicates that you want to simulate pedestrians.
       -sh (directory) – SUMO home location.
       -st (directory) – SUMO tools location.
       -rl (directory) – Directory where the results are going to be saved.
       -ng (int) – Number of junctions in both dirs.
       -gl (int) – The length of streets in both dirs.
       -sd (int) – Simulation duration in seconds.
       -step (int) – Simulation step (granularity) in seconds.
       -nc (int) – Number of cars.
       -nb (int) – Number of buses.
       -np (int) – Number of pedestrians.
       -s (int) – Seed for the simulation.

Here is an example:

python3 genSUMOtraces.py -c -b -p -sh /home/$USER/sumo -st /home/$USER/sumo/tools -rl /home/$USER/offloadingResults/mobTraces -ng 11 -gl 200 -sd 10 -step 1 -nc 40 -nb 4 -np 45 -s 1

Notes:

  1. The SUMO home and tools locations are the same ones you used to build SUMO.
  2. You can choose to generate the traces without specifying a seed. In that case, a random seed will be chosen by SUMO. For that, simply run the same command without the "-s" argument.

Generating nodes positions

In this work we used Homogeneous Poisson Point Process (HPPP) to generate the nodes (Base stations and MEC hosts) positions.

You can create your own nodes positions with HPPP by running the following script combined with the arguments:

python3 genNodesPositions.py -x areaSizeHorizontally -y areaSizeVertically -n numberOfNodes

Where:
       -x (float) – Area size horizontally in meters.
       -y (float) – Area size vertically in meters.
       -n (int) – Number of nodes.

Here is an example:

python3 genNodesPositions.py -x 2000 -y 2000 -n 475

A file named "nodesPositions.csv" will be generated with a position for each node.

You can find the positions we created for the paper in Data/. The file "bsHPPP.csv" has the Base Stations (BSs) positions and file "mecHPPP.csv" the MEC Hosts (MHs) positions we used.

Protecting users' positions

In this work we used geo-indistinguishability, a state-of-the-art technique based on differential privacy, to provide location privacy for the user by producing a new (fake) position.

You can apply geo-indistinguishability to the mobility traces you generated with SUMO by running the following script combined with the arguments:

python3 geoIndPositions.py -mrl sumoResultsLocation -rl geoIndResultsLocation -x areaSizeHorizontally -y areaSizeVertically -e epsilonValue -nbp numberOfBusPassengers

Where:
       -mrl (directory) – Directory where the mobility traces results were saved.
       -rl (directory) – Directory where the geo-indistinguishability results are going to be saved.
       -x (float) – Area size horizontally in meters.
       -y (float) – Area size vertically in meters.
       -e (float) – Epsilon value.
       -nbp (int) – Number of passengers on each bus.

Here is an example without privacy (𝜀 = ∞):

python3 geoIndPositions.py -mrl /home/$USER/offloadingResults/mobTraces -rl /home/$USER/offloadingResults/geoInd -x 2000 -y 2000 -nbp 10

Here is an example with a level of privacy (𝜀 = 0.1):

python3 geoIndPositions.py -mrl /home/$USER/offloadingResults/mobTraces -rl /home/$USER/offloadingResults/geoInd -x 2000 -y 2000 -e 0.1 -nbp 10

Notes:

  1. Do not forget to use the same directory where the mobility traces results were saved.
  2. You can choose to run this script without specifying a value for epsilon. In that case, no privacy will be applied, i.e., 𝜀 = ∞. For that, simply run the same command without the "-e" argument.
  3. It is necessary to inform the area size because the new (fake) position has to be inside the area, and truncation will be applied if that is not the case.
  4. Here you can define how many passengers you want on each bus. We used 10 passengers per bus in the paper.

A file named "geoIndDataEPSILONVALUE.csv" will be generated with geo-indistinguishability applied for each position.

Generating the data set

Here we detail how to generate the complete data set.

You can create the data set by running the following script combined with the arguments:

python3 genDataset.py -grl geoIndFile1 geoIndFile2 geoIndFileN -rl datasetLocation -bs bsNodesPositions -mh mhsNodesPositions -appP appsPercentages

Where:
       -grl (files) – Files generated by geo-indistinguishability.
       -rl (directory) – Directory where the data set is going to be saved.
       -bs (file) – Base stations positions file location.
       -mh (file) – MEC Hosts positions file location.
       -appP (file) – Percentage of users that run each app per mobility.

Here is an example:

python3 genDataset.py -grl /home/$USER/offloadingResults/geoInd/geoIndDataINF.csv /home/$USER/offloadingResults/geoInd/geoIndData0.1.csv -rl /home/$USER/offloadingResults/dataset -bs ../Data/bsHPPP.csv -mh ../Data/mecHPPP.csv -appP ../Data/appsPercentages.csv

Notes:

  1. The "Base stations" and "MEC Hosts" positions files are the ones you generated previously.
  2. The script will get the values of epsilon from the geo-indistinguishability file names. For example, if files "geoIndDataINF.csv", "geoIndData0.1.csv" and "geoIndData0.01.csv" are used as arguments, the script will run for the values [∞, 0.1 and 0.01].
  3. It is necessary to have the "geoIndDataINF.csv" file, i.e., geo-indistinguishability applied for 𝜀 = ∞. This is because it is necessary to know the users' real position in order to estimate the User Equipment (UEs) bandwidth.
  4. If you face an error like "ValueError: math domain error", there are too few BSs in the area and you need to increase the number of BSs in order to properly serve the users.
  5. The file appsPercentages.csv indicates the percentage of users that are going to use an application per mobility type. You can find the file we created for the paper in Data/, and modify it as you like.

Running the offloading simulation

Now we detail how to run the offloading simulation.

You can run the offloading simulation by running the following script combined with the arguments:

python3 offloadingSimulation.py -drl datasetLocation -rl simulationResultsLocation -bs bsNodesPositions -mh mhsNodesPositions -appP appsProfiles -dms latencyConversion

Where:
       -drl (file) – Data set file location.
       -rl (directory) – Directory where the offloading simulation results will be saved.
       -bs (file) – Base stations positions file location.
       -mh (file) – MEC Hosts positions file location.
       -appP (file) – Profiles for each application.
       -dms (float) – Latency estimation per kilometer in milliseconds.

Here is an example:

python3 offloadingSimulation.py -drl /home/$USER/offloadingResults/dataset/offloadingDataSet.csv -rl /home/$USER/offloadingResults/simuResults -bs ../Data/bsHPPP.csv -mh ../Data/mecHPPP.csv -appP ../Data/appsProfiles.csv -dms 50

Here is the meaning of each column in the results file:

  • epsilon: User request epsilon value.
  • timestamp: User request timestamp.
  • uato: User request was offloaded.
  • unatoLackUEbwd: User request was not offloaded because the throughput between the UE and the BS it is associated with is not enough to meet the application throughput requirement.
  • unatoLat: User request was not offloaded because the latency between the BS the UE is associated with and the selected MH by the system is too high to meet the application latency requirement.
  • unatoLackMHbwd: User request was not offloaded because there are not enough network resources (bandwidth) on the selected MH.
  • userID: An identifier for the user.
  • userBS: The BS the user is connected.
  • userPrivBS: The BS the user WOULD be connected if he was in the private position.
  • userMH: The selected MH (closest to userBS) in a no-privacy scenario, i.e., using userBS as reference.
  • userPrivMH: The selected MH (closest to userPrivBS) if the user was connected to userPrivBS.
  • userLat: The latency between userBS (BS the user is really connected) and userMH (MH of choice if the user position is not disturbed).
  • userPrivLat: The latency between userBS (BS the user is really connected) and userPrivMH (MH of choice if the user was connected to userPrivBS).
  • appLat: Application latency requirement.
  • userBwd: The throughput capacity between the UE and the BS it is connected to (userBS).
  • appBwd: Application throughput requirement.
  • userApp: Application the user intends to use.
  • userMob: User’s mobility.

Notes:

  1. The data set is the one you generated previously.
  2. The "Base stations" and "MEC Hosts" positions files are the ones you generated previously.
  3. The file appsProfiles.csv indicates the profiles for each application. You can find the file we created for the paper in Data/, and modify it as you like.
  4. A user request can be denied by multiple factors, e.g., both "unatoLackUEbwd" and "unatoLat" equal to 1 means that neither throughput nor latency requirements were met.

IEEE PIMRC 2023 paper

For more information, read the IEEE PIMRC 2023 paper.

Paper data sets

The data sets we generated for the IEEE PIMRC 2023 paper are publicly available.

You can download the data sets by running the following script:

python3 datasetDownloader.py

The data we simulated (which includes ∼405 million user requests on different privacy and mobility scenarios) contains 30 different files, as detailed on the paper.

The script will download a ZIP file with the 30 files compressed, the size of the ZIP file is 11.7 GB. When unzipped, each file has 1.3 GB, and the complete data set 38.1 GB.

Feel free to use the data sets and the environment! Please do not forget to cite our paper! :)

Citation

@inproceedings{esper2023impact,
  author={Esper, Jo{\~a}o Paulo and Achir, Nadjib and Cardoso, Kleber Vieira and Almeida, Jussara M},
  title={{Impact of User Privacy and Mobility on Edge Offloading}},
  year={2023},
  pages={1--6},
  organization={IEEE},
  booktitle={2023 IEEE 34th Annual International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC)},
  doi={10.1109/PIMRC56721.2023.10293816}
}

Contact us

If you would like to contact us to contribute to this project, ask questions or suggest improvements, feel free to e-mail us at: [email protected]

offloading's People

Contributors

joaopauloesper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.