As a User, When I fetch the Static Exercises List, Then a static object is fetched from S3, And it is ordered by exerciseId
Why?
When building out the exercise list in the back end, parsing and storing in DynamoDB became complicated and saturated the 1MB per page limit. This led to pagination in the response from the API and therefore was not ordered correctly.
What needs to be done?
An S3 bucket needs to be created to host static JSON of an array of objects which is parsed from a CSV file.
When a new CSV file is uploaded, it needs to parse this, convert to an array of objects in JSON format and upload it to the S3 bucket, deleting the old one in the process.
When the get-exercises-list API is called, it should fetch the JSON object from the S3 bucket to be used in the front-end for the exercises list
NOTE:
This may not be the best method for this, any suggestions on how the UI / UX could be improved for this to allow for pagination / lots and lots of exercises - or the technical back end implementation may be incorrect as data may change frequently?
Potential issues to be solved before implementation
Need to find a way to add new exerciseIds without breaking the exisiting naming e.g. if you had:
Running, slow, exerciseId: 10
Running, fast, exerciseId: 11
And someone had already use these Ids - changing it to this:
Running, slow, exerciseId: 10
Running, medium, exerciseId: 11
Running, fast, exerciseId: 12
Would break the existing naming - how do we circumvent this? Options:
Could we add an ordering mechanism?
Could there be a way to maintain previously generated ids from UUID when creating the new one? If we were to upload a new file, this would eliminate / regenerate the id field
Would it be better to have an exerciseId which is static and an order which can change and a UUID?
As a User, When I fetch the Static Exercises List, Then a static object is fetched from S3, And it is ordered by exerciseId
Why? When building out the exercise list in the back end, parsing and storing in DynamoDB became complicated and saturated the 1MB per page limit. This led to pagination in the response from the API and therefore was not ordered correctly.
What needs to be done?
NOTE: This may not be the best method for this, any suggestions on how the UI / UX could be improved for this to allow for pagination / lots and lots of exercises - or the technical back end implementation may be incorrect as data may change frequently?
Potential issues to be solved before implementation Need to find a way to add new exerciseIds without breaking the exisiting naming e.g. if you had:
Potential Solution: UUID - generated exerciseId - RUN-10, RUN-11, SWI-10 order - 10, 11, 12