Loading...
GET /forecast
input params: location, datetime
returns:
{
temperature,
condition
}
Forecast table
The location and eventually the timestamp should be indexed to maximize lookup performance
Two main services:
We need to answer the user even if the exact requested location isn't in the database. To do that we can give the forecast of the closest location.
Efficient geospatial data structure (quadtree for instance) is needed to do that.
We should use a database system that supports geospatial data structure
As the system read-only (from a user perspective), there is no restriction regarding the consistency so we can choose the technology that provides us the best performance and scalability (NoSQL)