How SAP enables Tour de Cure to perform daily recap on performance and rider awards for Can4Cancer 2018
Gareth Lloyd and the other 149 riders and 40 support crew will embark on a 3-day ride from Forster to Sydney to raise vital funds for cancer cures. The organiser behind this event, Tour de Cure, wants a solution to perform daily recap on performance and rider awards from 28th to 30th October 2018.
This is how SAP enables Tour de Cure to perform daily recap on performance and rider awards for Can4Cancer 2018.
During registration, the SAP UI5 application will redirect the rider to Strava. When the rider gave his/her approval for SAP to crawl his/her data, they will be redirected back to the SAP UI5 application with an access token. The SAP UI5 application will then gather the rider’s particulars from Strava using that access token. When the rider confirm his/her registration on the SAP UI5 application, his/her details will be saved to a HANA database instance.
Activities of the riders are downloaded to the HANA database instance via a Python 3 Flask application running on SAP Cloud Foundry.
The Python 3 Flask application consists of an API endpoint that allows the caller to trigger the download job. In addition, there is a cron scheduler being setup to trigger the download job once a day.
When a download job is requested, the Python 3 Flask application uses the riders’ tokens to get their latest activities data from Strava API. In order to speed up the downloading of activities data, each the downloading of each participant’s data is first defined as a task. After that, the Python 3 Flask application uses Flask-APScheduler to run multiple tasks in parallel.
Once Strava API responded with the activities data, the Python 3 Flask application uses Flask-SQLAlchemy to persist the data to the HANA database instance.
Analysing riders’ activities with HANA
Finally, SAP HANA analytics is tapped on to provide Tour de Cure with key insights about the riders’ performance throughout the race.