Weather API design | LLD-HLD
Anonymous User
1827

Can anyone help me with this?

Design Weather service that will aggregate the data retrieved per hour from the sensor.
Weather sensor will collect and store the data per second.

User can make the request(using rest api's) for retrieving data for current time(present hour),last 1 hr or 
any random duration and weather data(temperature) should be presented by averaging
the data per hour for what duration is requested.
For e.g. If user requests weather data for last 3 hrs,it should return the average temperature of last 3 hrs.

How we will design this service and data structures which are used to store the data per second wise 
and aggregating them on the basis of user requests(last 3 hrs/10 hrs);given that the data is stored in memory/variables instead of DB or file system?
Comments (2)