Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
Components involved
Flows involved
{
name: varadharajan,
age: 40,
sex: male,
date_of_birth: 07-05-1980,
height : 160,
height_units: cm
weight : 80
weight_units : kilograms,
extenal_provider_id : google_id,
userName: bigdaddyv
}
{
user_name: bigdaddyv,
date: 2024-09-04 13:42:22 +0530,
exercises :
[
{
exercise : "Hammer curl",
sets:
[
{
weight: 10,
reps: 12
},
{
weight: 10,
reps: 12
}
]
},
{
.
.
.
}
]
}
Offline flow
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
Cache
We will be using Redis Cache to provide caching support to this application. Following are the key concepts
Database
We will be using a MariaDB or MySQL database or any relational database as we don't have any unstructured data. We will be maintaining 3 nodes with 2 nodes replication.
We will shard on the basis of user id to ensure even distribution. Distribution of keys on nodes will be done using consistent hashing to ensure that when nodes are added or removed, it's done with minimal impact
Scenarios
This app does not support cycling based workouts