Honours Project

Web, Protocol, Python, Flask, Bootstrap, Nginx, Raspberry Pi, University

My honours project dissertation shifted direction a few times during the course of my final semester. My original literature review focused on visualisation aspects of data, emphasising what made data accessible to the masses. I looked into the works of many industry experts on the topics including Edward Tufte, Andy Kirk, Ben Schneiderman, John W. Tukey, and Mike Bostock.

Self hosted

One of my project goals was to host the project myself as self-hosting was something I was also interested in. To do things as cheaply as possible I opted for hosting on a Raspberry Pi, which I had not really made use of before. I knew it was capable of web serving however I wanted to maximise performance and serve as many clients as would be possible. I compared Apache performance with NginX and found the responce time was higher with the latter. NginX was also new to me but the documentation is very thorough, and I had hello world running on my mac in a few minutes.

Due to my previous experience with Python Flask I opted to use this initially for back-end development. This posed a problem however as Flask is single threaded and only able to serve one concurrent client. It’s mainly designed to be a development server so I would need to couple Flask within the the NginX server.

Stack design

Luckily my research led me to WSGI (web server gateway interface). “a simple calling convention for web servers to forward requests to web applications or frameworks written in Python” – Wikipedia. When used with uWSGI protocol inner server communications are very fast, and I set up a reverse proxy WSGI server to supply NginX with Python callable.

Honours stack

The design and implementation of the server stack took a large chunk of my development time and my project leant towards this instead of data visualisation. I learned a great deal about web protocols and the project made much more aware of back-end systems. The data visualisation aspects of the project slowly became out of scope, however I still included examples of the capabilities of d3.js in the end product.

I had to overcome other issued such as dynamic DNS and local network issues. Mostly due to the fact the Pi was just on a home interenet connection.

The project is not live anymore, because I have recycled the Pi for another project I am working on!