barbeau / OpenTripPlanner

Modified version of OTP for Tampa, Fl deployment
http://www.opentripplanner.usf.edu
1 stars 0 forks source link

Add real-time data #4

Open barbeau opened 9 years ago

barbeau commented 9 years ago

From @vreixo, and his config of a server to test real-time, here is what the Graph.properties file should look like:

rt.type = stop-time-updater
rt.sourceType = gtfs-http
rt.frequencySec = 60
rt.url = http://realtime.prod.obahart.org:8088/trip-updates
rt.defaultAgencyId = HART

This requires adding to the HART gtfs, agency_id field in agencies.txt, with value HART. Configuration w/o adding agency_id field to GTFS is currently unknown.

Note that we'll need to update the OTP code to the current master branch to configure this.

vreixo commented 9 years ago

@barbeau this is my exact config on my working server:

rt.type = stop-time-updater
rt.sourceType = gtfs-http
rt.frequencySec = 60
rt.url = http://realtime.prod.obahart.org:8088/trip-updates
rt.defaultAgencyId = HART

This is my agencies.txt:

agency_id,agency_name,agency_url,agency_timezone,agency_lang,agency_phone,agency_fare_url
HART,Hillsborough Area Regional Transit,http://www.gohart.org,America/New_York,en,813-254-4278,http://gohart.storesecured.com

And I have pulled opentripplanner from master like two days ago, although before was also working for this config.

To have the updated timetable will be needed to make some changes in the code. I can show you my solution but it's not yet code perfectly written and tested to push my changes to master, and I also suppose that Andrew will eventually do it in a much better way :-)

btw. what is exactly the problem that you have now with the config?

barbeau commented 9 years ago

Thanks @vreixo! No problem yet (haven't tried it yet), I just wanted to make sure I had the right info (you mentioned something about not having the right config in another issue - wasn't sure if my original comment was outdated).

For reference in this issue, here's what real-time looks like in OTP Android:

otpandroid-realtimeworking

vreixo commented 9 years ago

@barbeau you can check my modified branch here https://github.com/vreixo/OpenTripPlanner/tree/master_realtime_trips_stoptimes_tametable

barbeau commented 9 years ago

@vreixo Nice! Are you going to submit this in a PR to the server OTP project?

vreixo commented 9 years ago

@barbeau if you want it's ok, but keep in mind that is not the most pretty code because I didn't have too much time to make this patch :-)

2014-09-11 9:22 GMT-04:00 Sean Barbeau notifications@github.com:

@vreixo https://github.com/vreixo Nice! Are you going to submit this in a PR to the server OTP project?

— Reply to this email directly or view it on GitHub https://github.com/barbeau/OpenTripPlanner/issues/4#issuecomment-55262508 .

barbeau commented 9 years ago

@vreixo No worries - server OTP maintainers will provide feedback if its not ok to merge. But, IMO, something working is better than nothing.

vreixo commented 9 years ago

@barbeau ok, I'm creating the pull request and it says that more than 250 commits differ. Do you prefer to update your repo first from master or I'll add the pull request like this?

barbeau commented 9 years ago

@vreixo Sorry - I meant to submit the PR to the main OTP project - https://github.com/opentripplanner/OpenTripPlanner

I'll then pull the full history from the main OTP project, including your commit if your PR gets merged.

vreixo commented 9 years ago

@barbeau I have submitted my pull request https://github.com/opentripplanner/OpenTripPlanner/pull/1495.

barbeau commented 9 years ago

Here is Vreixo's test server, that currently contains Tampa data, for comparison: http://galadriel.dc.fi.udc.es:9090/otp

@vreixo Do you intent to take this server down soon?

vreixo commented 9 years ago

@barbeau as long as they let me have it, it will be up :-) It's a server from the university but it's a very old machine that was not being used for anything and it handles correctly both graphs at the same time, so hopefully will continue after the project.

I have both graphs monitored to check that they're always on.

2014-09-11 13:37 GMT-04:00 Sean Barbeau notifications@github.com:

Here is Vreixo's test server, that currently contains Tampa data, for comparison: http://galadriel.dc.fi.udc.es:9090/otp

@vreixo https://github.com/vreixo Do you intent to take this server down soon?

— Reply to this email directly or view it on GitHub https://github.com/barbeau/OpenTripPlanner/issues/4#issuecomment-55299782 .

barbeau commented 9 years ago

@vreixo How are you monitoring the OTP server? Via REST API requests?

I'm interested in a watchdog application for the OTP REST API, that would email us if the server goes down. We have something similar for OneBusAway, but I don't recall seeing anything similar for OTP.