Loading...
1.) GET : v1/workout?type={type}
2.) GET : v1/workout/user/{id}?date_range={}&stats={}
3.) POST : v1/workout/user/{id}
req body: { workout, workout_type, time, count, calories, stats }
flowchart TD
B["client"];
C{"server"};
D["Database"];
E(("CND"));
F{"Load Balancer"};
rd[("redis cache")];
ag["API gateway"];
B --> E;
E --> F;
F --> ag;
ag --> C;
C --> rd;
C --> D;
at the api level in server we will provide rate limiting for post or get on user
caching for get, and when post clear cache on that user
we use post to sync all the data when user comes online
i can use a hash structure on the workout info for deduplication