Skip to content

A highly scalable natural disaster management system using an information centric network (ICN).

Notifications You must be signed in to change notification settings

saisankp/Scalable-P2P-Protocol

Repository files navigation

Scalable ICN for Disaster-Management using Peer-to-Peer Communication

This project simulates a disaster management system using a scalable information centric network (ICN). Devices have 8 sensors/actuators that monitor readings for earthquakes, wildfires, and hurricanes. If these go over a threshold, they contact drones who assist the situation. Drones have a water payload, a general payload for first aid kits etc, speakers for preset information for the general public, and flashlights for visibilty. Drones decrease their battery over time, so they communicate with drone chargers to charge while carrying out tasks for devices monitoring the environment.

Members of Group 2

Student Name Student ID Course GitHub Username
Prathamesh Sai 19314123 Integrated Computer Science (M.C.S.) saisankp
Sean Dowling 19333739 Integrated Computer Engineering (M.A.I) seandownling123
Hamzah Khan 23335427 Computer Science - Data Science hamzah7k
Benika Yadav 23343816 Computer Science - Data Science beni444

Code contributions by each member are noted in comments above each function.

Setup

Everything should already be setup with the use of the virtual environment env, so you only need to activate this virtual environment. If anything goes wrong, choose commands from setup.sh to fix any issues.

source env/bin/activate

Execution

There are multiple ways of running the code to see the value it brings. The Raspberry Pis we used are provided to us by SCSS (School of Computer Science and Statistics) at Trinity College Dublin through a ssh connection from macneill. Beware that before running any .sh file, you may need to allow permissions to avoid the error "permission denied". You can do so by doing chmod +x nameOfFile.sh, followed by ./nameOfFile.sh to run it.

1. Regular execution across various Raspberry Pis

Here is a scenario that utilises all 5 devices our system uses (which have 8 sensors/actuators each) and shows how each device communicates with each other across multiple Raspberry Pis. Port 33800 is used for the discovery stage (to let new devices know where other devices are and to let existing devices know when a new device enters the network).

Regular execution

You need 2 terminals open per Raspberry Pi.

On Raspberry Pi #2 (Drone and Earthquake Device):

Terminal 1 (Drone):

chmod +x demonstration/demo-1/pi-2/terminal-1.sh
./demonstration/demo-1/pi-2/terminal-1.sh

Terminal 2 (Earthquake Device):

chmod +x demonstration/demo-1/pi-2/terminal-2.sh
./demonstration/demo-1/pi-2/terminal-2.sh

On Raspberry Pi #25 (Drone and Hurricane Device):

Terminal 1 (Drone):

chmod +x demonstration/demo-1/pi-25/terminal-1.sh
./demonstration/demo-1/pi-25/terminal-1.sh

Terminal 2 (Hurricane Device):

chmod +x demonstration/demo-1/pi-25/terminal-2.sh
./demonstration/demo-1/pi-25/terminal-2.sh

On Raspberry Pi #27 (Drone Charger and Earthquake Device):

Terminal 1 (Drone Charger):

chmod +x demonstration/demo-1/pi-27/terminal-1.sh
./demonstration/demo-1/pi-27/terminal-1.sh

Terminal 2 (Wildfire Device):

chmod +x demonstration/demo-1/pi-27/terminal-2.sh
./demonstration/demo-1/pi-27/terminal-2.sh

Make sure you run these scripts on their appropriate Raspberry Pis. Using a different machine will cause issues since the commands used are catered to each Raspberry Pi.

2. View the robustness of our system

Drones in disaster scenarios are going to experience network issues. What happens if a drone loses connection with a drone charger all of a sudden?

No response

How will a drone know where to go if only a wildfire device is responsive? The answer is flooding! By flooding the network with the device's known devices and passing the requested information in the packet (in this case the GPS location), the wildfire device can communicate with the drone charger on behalf of the drone and give the response back. Now, the drone knows where to go!

No response

You need 1 terminal open on the Raspberry Pi #2 and 2 terminals open on the Raspberry Pi #27

On Raspberry Pi #2 (Drone):

Terminal 1 (Drone):

chmod +x demonstration/demo-2/pi-2/terminal-1.sh
./demonstration/demo-2/pi-2/terminal-1.sh

On Raspberry Pi #27 (Drone Charger and Wildfire Device):

Terminal 1 (Drone Charger):

chmod +x demonstration/demo-2/pi-27/terminal-1.sh
./demonstration/demo-2/pi-27/terminal-1.sh

Terminal 2 (Wildfire Device):

chmod +x demonstration/demo-2/pi-27/terminal-2.sh
./demonstration/demo-2/pi-27/terminal-2.sh

Make sure you run these scripts on their appropriate Raspberry Pis. Using a different machine will cause issues since the commands used are catered to each Raspberry Pi.

3. Run all 5 devices per Raspberry Pi (OPTIONAL)

This is only optional if you are curious and want to experience some mayhem. It is hard to track everything going on, since there would be 5 devices x 3 Raspberry Pis = 15 devices running in total. However, if you are curious you can run it to see how the system handles it.

You need 5 terminals open per Raspberry Pi.

On Raspberry Pi #2 (Drone, Drone Charger, Earthquake Device, Hurricane Device, Wildfire Device):

Terminal 1 (Drone):

chmod +x demonstration/demo-3/pi-2/terminal-1.sh
./demonstration/demo-3/pi-2/terminal-1.sh

Terminal 2 (Drone Charger):

chmod +x demonstration/demo-3/pi-2/terminal-2.sh
./demonstration/demo-3/pi-2/terminal-2.sh

Terminal 3 (Earthquake Device):

chmod +x demonstration/demo-3/pi-2/terminal-3.sh
./demonstration/demo-3/pi-2/terminal-3.sh

Terminal 4 (Hurricane Device):

chmod demonstration/demo-3/pi-2/terminal-4.sh
./demonstration/demo-3/pi-2/terminal-4.sh

Terminal 5 (Wildfire Device):

chmod +x demonstration/demo-3/pi-2/terminal-5.sh
./demonstration/demo-3/pi-2/terminal-5.sh

On Raspberry Pi #25 (Drone, Drone Charger, Earthquake Device, Hurricane Device, Wildfire Device):

Terminal 1 (Drone):

chmod +x demonstration/demo-3/pi-25/terminal-1.sh
./demonstration/demo-3/pi-25/terminal-1.sh

Terminal 2 (Drone Charger):

chmod +x demonstration/demo-3/pi-25/terminal-2.sh
./demonstration/demo-3/pi-25/terminal-2.sh

Terminal 3 (Earthquake Device):

chmod +x demonstration/demo-3/pi-25/terminal-3.sh
./demonstration/demo-3/pi-25/terminal-3.sh

Terminal 4 (Hurricane Device):

chmod +x demonstration/demo-3/pi-25/terminal-4.sh
./demonstration/demo-3/pi-25/terminal-4.sh

Terminal 5 (Wildfire Device):

chmod +x demonstration/demo-3/pi-25/terminal-5.sh
./demonstration/demo-3/pi-25/terminal-5.sh

On Raspberry Pi #27 (Drone, Drone Charger, Earthquake Device, Hurricane Device, Wildfire Device):

Terminal 1 (Drone):

chmod +x demonstration/demo-3/pi-27/terminal-1.sh
./demonstration/demo-3/pi-27/terminal-1.sh

Terminal 2 (Drone Charger):

chmod +x demonstration/demo-3/pi-27/terminal-2.sh
./demonstration/demo-3/pi-27/terminal-2.sh

Terminal 3 (Earthquake Device):

chmod +x demonstration/demo-3/pi-27/terminal-3.sh
./demonstration/demo-3/pi-27/terminal-3.sh

Terminal 4 (Hurricane Device):

chmod +x demonstration/demo-3/pi-27/terminal-4.sh
./demonstration/demo-3/pi-27/terminal-4.sh

Terminal 5 (Wildfire Device):

chmod +x demonstration/demo-3/pi-27/terminal-5.sh
./demonstration/demo-3/pi-27/terminal-5.sh

Demo

A few basic/interesting scenarios are recorded in the /assets/demo folder. Feel free to check them out below if you don't want to run everything but just want a quick overview of our project.

Drone interacting with charger (when a drone has less than 35% battery)

drone-interacting-with-charger.mov

Drone interacting with devices (when devices detect a disaster and contact drones)

drone-interacting-with-devices.mov

Proof of robustness in our system with flooding (using a special drone charger file that purposefully doesn't respond to mimic harsh environmental conditions)

proof-of-robustness-with-flooding.mov

About

A highly scalable natural disaster management system using an information centric network (ICN).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •