I have an app that presents the bus vehicle locations for the entire city on demand. As is instructed in the developer notes, my app does not make direct requests to the MTA servers. Instead, I have one and only one web service that acquires the data from the MTA and stores the information on my servers. I then re-distribute the data as needed to my app via my servers which have cached the data.
My web service will currently wait 30 seconds before seeking a new set of data from the MTA server. Thirty seconds was the instructed minimum period for polling as per documentation. However, despite this I find that I still get throttled to the tune of about 10-15 seconds.
This is really bad because when I compare my bus locations to the official MTA app, my data is behind by as badly as 45 seconds sometimes.
Does anyone have a strategy for improving this? Ideally some guidance from the MTA dev team would be very appreciated. I want to play within the rules but do not want my data to be behind.
Since I am getting throttled I am thinking of subtracting my throttle time for the next poll attempt. So if I am throttled for 11 seconds I may make a new request 19 seconds later, for a total of 30 seconds since the initial request was made.
Making requests for individual routes wouldn't make much sense either -- that would cause me to make more calls into the MTA dev servers not less.