Completion Report - Map of the Taught Student's Labs

Final report for the #405 Map of the Taught Student's Labs computing project.

This project was to review and further develop, improve and integrate a desktop availability map already developed by students (, demo: , about: This was currently running on the Flask dev server so crashes fairly often and would require: some form of callback on login for DICE, with opt-in to name visibility to friends on the map; either integration with Informatics' LDAP or change to Cosign authentication; code review to make sure the existing code is sufficiently secure (it was built quickly over a weekend at a hackathon); moving off Tardis' servers onto an Informatics machine. The existing map service had two parts, the UI and webserver was written in Python, with a Redis backend. The crawler (not currently running) was also written in Python, and was an SSH bot runnable from DICE or within the Inf network that accesses all the machines it knows about and checks for a physical user, exporting a hashed string if someone is there; this is the component that would be replaced with the callback on login, as the SSH bot makes DICE pretty upset, and causes unnecessary amounts of traffic. Students continue to express interest in the map, but the students that built it don't have the time to maintain it. No concerns over privacy nor security have been raised though asking a wider population of students would be sensible.

After review it was determined:

  • to replace the crawler with a simple (Python) daemon that would run on every lab desktop reporting back console status, but not the console user unless they had explicitly opted in to allow this
  • to replace the existing UI/Redis backend with a Theon micro-managed service which provides sufficient database, access control, systems integration and API functionality without further work
  • to provide an Android application to interface to the API for general student usage
  • to allow the collected desktop usage to be accessible as aggregated statistics on overall lab usage
  • to provide a simple friends finding feature to the same kind of functionality as in the original service but with an opt-in approach

An initial design was produced with an emphasis on simplicity and so that ALL functionality including authorisation control could be implemented entirely within the PostgreSQL back end itself, making it easier to check and maintain security.

The project was completed with 154hrs effort (about four and a half weeks).

The project was structurally complete quite quickly, but the Android application took a bit more effort than expected (maybe half of the total), specifically in the areas of interfacing with the Cosign service to obtain credentials and in handling SSL certificates. Effort was also spent learning from scratch AndroidStudio, the app development environment/structure (use of layouts and resources for example) and Java.

Unfortunately we have no access to the data on when labs have been booked out for tutorial sessions and other group meetings, hence the application can show desktops available when they are not available as the room they are in is occupied. This would be a nice feature enhancement and would be trivial to add to the back end if we could actually get hold of the relevant data feed.

The API provides a call that lists all the desktops that have not responded made a status report within the last twenty four hours or more. There are some discrepancies compared to the equivalent report from the Inventory (Tartarus) which is primarily due to location handling (machines that have been relocated but not turned on again in the new location). However this provides some additional data for front line support in tracking down desktops that are not working correctly.

The API provides calls to return statistics on lab usage but we don't do anything with this yet. The data available is maximum and average percentage usage per-lab, per-floor, per-building within every 5 minute period (rolls over after twenty four hours), 30 minute period (rolls over after 7 days), sixty minute period (rolls over after one month) and daily period (rolls over after one year). The statistics are also currently uncategorised (type of user) which is a requested feature addition.

-- TimColles - 31 Jan 2019

Topic revision: r2 - 01 Feb 2019 - 09:45:15 - TimColles
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies