MobilityData / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds
Other
41 stars 10 forks source link

Optimize fetching feeds - compression and HTTP header "if modified" #31

Open barbeau opened 2 years ago

barbeau commented 2 years ago

Issue by barbeau Wednesday Apr 12, 2017 at 15:58 GMT Originally opened as https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues/124


Summary:

We should be sure to look at the following, which will optimize the fetching of feeds (both GTFS and GTFS-realtime):

I believe we'd want to first look at If-Modified-Since header, then Last-Modified header.

barbeau commented 2 years ago

Comment by skinkie Wednesday Apr 12, 2017 at 16:10 GMT


http://stackoverflow.com/questions/7095897/im-trying-to-use-javas-httpurlconnection-to-do-a-conditional-get-but-i-neve

barbeau commented 2 years ago

Comment by barbeau Tuesday May 23, 2017 at 14:55 GMT


TriMet's feeds are a good one to test this with:

Their GTFS downloads very slow for some reason.

@Suryakandukoori This would be another issue you could take a shot at (see above thread). GTFS data is fetched in GtfsFeed, and GTFS-rt data in BackgroundTask. I believe you'd need to add a new field "lastRetrieved" to the Hibernate model classes in the model package. Let me and @mohangandhiGH know if you have any questions.

barbeau commented 2 years ago

Comment by barbeau Tuesday May 23, 2017 at 14:57 GMT


Also, we'd want to test this against a few servers, including ones that don't support the HTTP headers (if we can find some) to make sure it works under both conditions. More GTFS-rt feeds (and corresponding GTFS data) can be found at http://transitfeeds.com/search?q=gtfsrt.