This PR will cover 2 important parts of the planner.
Better handling of places and information used for the Planner.
Automation of the places, distances and durations retrieval.
Planner
Refactored the code and separated logic in the corresponding module. Also eliminated the file handling and processing because we will count on the Amazon RDS.
Made changes in the planner rewards to calculate only the necessary rewards. Before, the planner was calculating the whole rewards matrix for all the places for a city. For example if we have 1000 places for a city, and the user wants to visit only 10, the rest of 990 are unused rewards, therefore was a waste of time. Right now the rewards are calculated only for the places the user selects.
Created an UpdateAction abstract class to handle the update operations for the planner database which include places and duration/distance matrix. After we call this request, possible only with an authorized key, we try to update also the cached results if applicable.
Automation for retrieving and storing planner info
This part will be done after the Database module will be updated to rely on the Amazon RDS storage.
Places retrieval will be done using the API from Foursquare.
Distances and durations retrieval will be done using the API from Google.
This PR will cover 2 important parts of the planner.
Planner
.places
,distances
anddurations
retrieval.Planner
Refactored the code and separated logic in the corresponding module. Also eliminated the file handling and processing because we will count on the Amazon RDS.
Made changes in the planner rewards to calculate only the necessary rewards. Before, the planner was calculating the whole rewards matrix for all the places for a city. For example if we have 1000 places for a city, and the user wants to visit only 10, the rest of 990 are unused rewards, therefore was a waste of time. Right now the rewards are calculated only for the places the user selects.
Created an
UpdateAction
abstract class to handle the update operations for the planner database which includeplaces
andduration/distance matrix
. After we call this request, possible only with an authorized key, we try to update also the cached results if applicable.Automation for retrieving and storing planner info
This part will be done after the Database module will be updated to rely on the Amazon RDS storage.
Places retrieval will be done using the API from Foursquare.
Distances and durations retrieval will be done using the API from Google.