GitHub repository: pgoldtho/balena-assignment
Primary language: JavaScript
Created: 2019-08-29T14:30:56Z
Description: REST API server which uses node-cache to maintain state.  It records drone positions in 3 dimensions (latitude, longitude and altitude) and follows HATEOAS application architecture principles. Each drone POSTs a JSON document with its location on launch then sends updates via PUT requests.  The JSON documents are validated using JSON schema before being accepted for processing.  After validating the JSON the application calculates the drone’s horizontal and vertical speed and stores it in node-cache.  GET requests can be used to return the location of a single drone or all the drones that are currently active in GeoJSON format. GeoJSON was chosen to simplify integration with external tools like Leaflet, Elastic Maps or Google BigQuery.  DELETE requests are issued at the end of a flight to mark a drone as inactive.    The application includes a web server endpoint which delivers an html file to display drone locations in a table and highlight slow moving ones.  It also includes a REST API client which can be used to issue POST, PUT and DELETE requests to populate it