Scalable Computing Project 4
The purpose of this project is to implement, validate and demonstrate a simple scalable communications protocol that employs Peer to Peer modalities of the type that might be found in Body Area Networking communication scenarios.
We propose a Wireless Body Area Network implemented for real time monitoring of patients in a hospital. Each patient is equipped with a number of sensors sending vital information to the sink attached to their body, which in turn, is capable of sending the data to a nearby edge node; the edge node being a server within the hospital. The edge node is where a doctor can monitor the status of all his patients using a dashboard.
The proposed network has three major components:
- Sink
- Sensors
- Edge node
Below are the guidelines to get the network simulation up and running for simulation:
"sink" is a simulator program for a sink, it is written in Golang
-
directory: sink
-
how to build:
-
install Golang
-
cd sink && go build -o sink main.go
-
-
how to run
./sink -h Usage of ./sink: -local string local addr (default "0.0.0.0:9090") -pda string personal digital assistant address (default "127.0.0.1:9091")
"sensor" is a simulator program for sensor, it is written in Golang.
you have to start sink first, then start all the sensors and give them the right sink address
sensor receives json files (dummy) as dataset, you can use following files as dataset for sensors
sensorBloodAlcohol.json
sensorBloodPressure.json
sensorBodyOxygen.json
sensorBreathingRate.json
sensorInsulin.json
sensorPacemaker.json
sensorTemprature.json
-
directory: sensors
-
how to build:
-
install Golang
-
cd sensors && go build -o sensor cmd/main.go
-
-
how to run:
./sensor -h Usage of ./censor: -addr string listen ip address (default "127.0.0.1") -dataset string dataset file (default "data.txt") -duration int working duration(seconds) (default 5) -id string sensor id (default "1") -interval int interval between working(seconds) (default 10) -port string listen port (default "1234") -sink string sink address (default "127.0.0.1:9090") -x int coordinate x (default 1) -y int coordinate y (default 1) -z int coordinate z (default 1)
There are two approaches:
A. Directly on the system using cmd
- Intsalling Go in the system.
- Starting the sink and builiding it via command prompt using GO libraries.
- After that starting sensors so as to connect to the sync.
Note: There might be IP address issues in this approach. Second approach using Ubuntu was therefore used to avoid such issues.
B. Using Virtualbox
- Install virtualbox.
- Download a Ubuntu iso image.
- Create a VM using iso image.
- Check the IP address(WiFi) of the main machine(i.e Windows) and provide it to the Edge node.
- Install tmux in the VM using
-
sudo apt install tmux
- Install git in the VM
-
sudo apt install git
- Cloning this repository using git clone (---)
- Go to the clone directory using cd
- Running the shell script using
-
sh start.sh
- This script will autmatically turn on sink node as well as the sensors.
Above steps should get the sensor running and send data to sink. This simulation is run on one single system, the system representing one patient
- Open Final_Sending_Code.py and Final_Receiving_Code.py and update the hostname, port number.
- Run the receiver code at edge node and sending code at sink node.
- Open the Microsoft PowerBI dashboard and click update. The dashboard gets updated with new data.