The major problem is not really distinguish if there was a problem or not, because, I can check if MapFlightExResult is empty and then automatically I know there was a problem, or if I receive any other http status code other than 200 OK. The type of the problem is good to know, if it will help us (clients) solve the problem below.
The thing is: This particular flight was enroute (returned by FlightInfoStatus), so the query to the Map should return the map image, right? I admit that, if the flight is not yet departed or if it already arrived, then this method does not make much sense and it will always return an empty image (I’m assuming that, don’t know for sure if it works like that), but the flight was enroute, so it should return the image data…but in this case, it returned 200 OK, empty body… so it could be only some server error, I’m supposing that.
My problem here, is that I dont know when to stop/restarting querying, regarding your responses.
Imagine my application logic queries FlightInfoStatus 10 to 10 minutes, during the duration of the flight, having in count estimated/scheduled departure times and arrival times that I previously know.
So imagine my first query to the enroute flight, gives this response. How do I know If I’ll get any correct information in next requests till flight ends? Sometimes I will be querying for nothing, because of some type of server error, or because you don’t have correct /complete information to return the image (I’m wondering why, because the flight is enroute…). How do I know if it worths querying next time or not?
And I understand your concerns on protecting yourselfs against abusive applications that waste server resources on requests that generally fail, but you can implement other strategies on that, like for example: blocking temporarily IP address on abusive requests, or block account temporarily, or others… there are alternatives I guess…
Imagine I track 200 flights a day (170 with success)
6 queries per hour * 5hours of flight time (average)*170 flights * 30 days = 153000 queries
Imagine how many requests are billed for nothing during an average of 5 hours flight time x 30 tracked flights a day that fails on obtaining map (average)(adjusting flights to more, and is scary)
6 queries per hour * 5hours *30 flights * 30 days = 27000 queries
Total average: 180000 queries month only to Map Method. So because we are in this range: 100,000 - 249,999, then each class1 query will cost: $0.0040
Bill amount for nothing: $0.0040 * 27000 = $108
Bill amount that was fair: $612
Total Cost: $720
Beeing billed for nothing is not a nice thing…
But in your perspective is great…it will help to pay your salary.