treyturley / FSEJobFinder

A tool to find flights in FSEconomy.
https://treyturley.com/fse-job-finder
0 stars 0 forks source link

Pool requests together and store results to reduce the number of requests to the FSE Data API #6

Open treyturley opened 3 years ago

treyturley commented 3 years ago

Currently each time we select an option from the menu to find a job two requests to the FSE Data API get fired off. We could reduce the number of calls made to FSE by collecting common requests like for assignments into one request.

Pooling requests

Example of current interaction: launch app select 737 jobs Two requests to FSE fire off

New Feature: launch app foreach aircraft that the app supports that has commercial jobs (all-in reserved jobs) get the airports with un-rented planes

upside: in the case that an user is looking for 737, 747, and A320 flights we go from 6 calls to 4 calls downside: if an user is only looking for 737 jobs, we go from 2 calls to 4 calls.

Storing results Save the responses we receive from FSE so that they can be referenced in future requests. FSE data doesn't change too often and its not a huge deal if a job is no longer available so we can start with a 30 minute cache for commercial job data.

treyturley commented 3 years ago

Storing responses from FSE is moving into its own issue. See #11