The most computationally expensive thing in the app is what happens when a student clicks the "Train new machine learning model" button for image projects.
This has to:
download all of the images from the project
resize them
create a zip with all of them in
upload that zip to IBM Watson (Visual Recognition)
The most computationally expensive thing in the app is what happens when a student clicks the "Train new machine learning model" button for image projects.
This has to:
The main bit of that starts here: https://github.com/IBM/taxinomitis/blob/85b3d1c59a8580b54875d62cc7d5c844dd0bd27b/src/lib/utils/downloadAndZip.ts#L329
That is memory intensive, so the app is provisioned with more memory than it really needs to cope when a class of students all start training image projects at the same time. https://github.com/IBM/taxinomitis/blob/85b3d1c59a8580b54875d62cc7d5c844dd0bd27b/manifest-template.yml#L3-L4
It means the app runs at single-digit CPU percentage most of the time, and very low level memory and disk usage.
Offloading this task to a serverless function would mean I could hugely shrunk the deployment footprint for the main server.