List functional requirements for the system (Ask the chat bot for hints if stuck.)...
List non-functional requirements for the system...
Define what APIs are expected from the system...
API: getCurrentWeather
request: locationInfo
response: weatherInfo, temperatureInfo, precipitationInfo, humidity, windSpeed
API: getWeatherPrediction
request: locationInfo
response:
List
The list should contain 7 entries, each for a day in the next week.
The WeatherPrediction object should include a date object represents the date that the weather prediction is for, as well as certain weather information including temperature and weather prediction
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
The basic system is very simple as it consists of only client, server and the third party vendor. There is no internal data storage needed for the functionality.
We should add a cache in the system to store the already fetched weather data for each location, this would help alleviates traffic to vendor and potentially reduce cost.
However, to store Business Intelligence data (such as number of clicks, etc), there are three more components needed: A queue to store data processing jobs, job handler worker machines, and a data warehouse. The purpose of queue and worker is to handle the data asynchronously, so that the latency of handling data would not affect user traffic. The data warehouse is used to store BI data.
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Cache:
The system is mostly doing reading as read data from vendor. Therefore, we can use a read-through cache in the system. The server should read the cache first, if the data is not in the cache, the cache system read data from vendor and have the result cached.
BI Data Queue:
We use a queue in the system to store metrics for future usage. The queue could be a kafka or sqs job queue. This helps decouples the BI data handling and real time traffic, so that the process of handling BI data should not affects users latency
Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...
Not applicable as we do not store data internally for functionality, we might store data for BI purposes.