Detailed Component Design
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
- Workout service - Creates session id on the every new work out starts
- Workout service - Records the details under the session id
- Work out service - On Completion of session , it updates duration of workout
- Workout service - Records the session details in the Postgres
- Workout service - On completion of each sessions - fire the analytic event
- Workout service - Offline synch - helps in case device is not connected
- Workout service - Offline synch - Creates Synch ID
- Workout service - Offline synch - Update the data under this - Segmented data will be send by edge - to better use of network , combining multiple sessions data or single session data
- Workout service - on receiving of data , it will be put in to queue for processing
- Workout service worker - will be scaled on the depth of queue
- Workout service - Maintains the check point of data received for synch id
- work out service - Incase of again disconnection - edge can request for check point or service can respond with check point in case receives duplicates
- GPS Location - Receiving the data out of order , we persist the data against time stamp . Databse will store in the order of time stamp , which will be used for all analytical and stats purpose
- In case of missing data - use interpolation of data to get missed points