This web app displays a geographic map of the NDN testbed with real-time bandwidth data.
There are two parts to the app, the WebServer and the DataCollection.
For the GEC-13 demo in March we ran the ndnmap web server on an AWS EC2 instance. There may still be some lingering vestiges of that implementation in this release. Sorry if that causes any confusion.
Clone ndnmap
.
cd ndnmap/WebServer
./install.sh -D ndnmap -n ndnmap -U ndnmap -w example.com -s http://www.arl.wustl.edu/~jdd/NDN/static -P -g https://[email protected]/WU-ARL/ndnmap.git -u ndnmap -p /home/ndnmap/ndnmap -f /home/ndnmap/ndnmap/WebServer/deploy/initial_data.json
sudo vi /home/ndnmap/ndnmap/WebServer/settings.py
sudo /etc/init.d/apache2 reload
Here are the old install directions:
Install the packages in deploy/requirements.txt
.
-
pip
(and optionally virtualenv) simplifies the processsudo easy_install -U pip # requires setuptools pip install -r deploy/requirements.txt
Obtain a key for the Google maps API and enter the API key in
ndnmap/settings.py
:
# API key for the Google Maps applications
GMAP_API_KEY='XXX'
In ndnmap
dir, run
./manage.py runserver
Open the home page in your browser: http://localhost:8000/
The routers report transmit (tx) and receive (rx) bits via an HTTP request:
example.com/bw/<link_id>/<time>/<rx_bits>/<tx_bytes>/
Field descriptions
link_id
(integer) link identifiertime
(interger) timestamp (seconds since the epoch)rx_bits
(integer) number of bits received (monotonically increasing)tx_bits
(integer) number of bits transmitted (monotonically increasing)
Other relevant but optional settings in ndnmap/settings.py
follow.
# Show 0 bandwidth if time since last update > GMAP_LINK_ALIVE_INTERVAL (s)
GMAP_LINK_ALIVE_INTERVAL = 10
# Update bandwidth on map every GMAP_BW_UPDATE_INTERVAL (s)
GMAP_BW_UPDATE_INTERVAL = 0.5
Test the gmap
application.
fab test
Generate fake data for visual tests:
- Use the admin site: example.com/admin (
user=demo and pass=demo
) - Run the
xb.sh
scripts:ndnmap/gmap/test.xb -h
Remove all gmap
records from the database
fab reset