Web App Development

CS 2340 Scala Project: Risk

Start

January 2019

End

May 2019

The frontend is built with Vue.js and HTML Canvases, leveraging the Javascript canvas library Konva, while the backend is built with Play Framework and Akka in Scala. The two sides communicate over a Websocket connection, and the backend features a custom SVG map ingestion pipeline written in Python.
Play/AkkaScalaVue.jsDockerBootstrapGitHTML CanvasWebsocketPythonKubernetesNginxAzureOpenShiftBatchfileSVGJSON
The interactive gameboard screen map, showing each territory and the number of troops on them. Click or tap and drag to pan, zoom with pinching or scroll wheel. Left click on a territory to add a single army unit, and right click to remove.

Role

For this project, my primary role on the team was lead backend engineer, and I also ended up configuring the containerized deployment of our application on a variety of platforms (both within orchestration environments and standalone). While I did contribute to the frontend of our application, especially where it concerns overall architecture and program structure, the majority of my contributions were either to the backend or for deployment.

Backend

Over the course of the project, I was responsible for developing the structure of the application’s backend, which, according to the project’s guidelines, was a Play Framework application written in Scala. In addition, we made heavy use of a variety of libraries such as:

Build Pipeline

A variety of Python, Batchfile, and Bash scripts were made to handle the process of building from compilation to deployment. Altogether, they automated performing the following high-level tasks:

  1. Building the map data from SVG to JSON
  2. Building the frontend using Webpack/Vue CLI
  3. Building the backend using sbt and packaging it to a zip
  4. Unzipping the built archive and configuring the start script
  5. Adding additional files, such as data/documentation files
  6. Building, tagging, and pushing the Docker image

Deployment

When it came to running our project in a production environment, I settled on using a Docker container based on an Alpine image that came preloaded with the JRE 8. Initially, I configured deployment for Redhat’s OpenShift Online before switching to Microsoft’s AKS, both of which use Kubernetes for orchestration.

While these worked well, they proved to be inadequate for long-term deployment, with even short term costs proving to be substantial. With this in mind, the final solution ended up being a vanilla Docker environment running on a bare metal Ubuntu server. Additionally, in order to support HTTPS in this environment, I ended up using an Nginx container acting as a reverse proxy to handle SSL termination.

Contributors

The project itself was produced for CS 2340 at Georgia Tech with Professor Christopher Simpkins (class website), where our team consisted of the following members: