Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] How does one use rrrr #118

Open
bambax opened this issue Mar 30, 2014 · 4 comments
Open

[question] How does one use rrrr #118

bambax opened this issue Mar 30, 2014 · 4 comments
Labels

Comments

@bambax
Copy link

bambax commented Mar 30, 2014

How does one query rrrr? I have it running with some GTFS data, but can't seem to figure out how to query it (sorry!)

Is it possible to query it via HTTP / does it need a webserver in front of it...?

Is there a doc for the API?

Thank you.

@skinkie
Copy link
Contributor

skinkie commented Mar 30, 2014

After you compile the code the commandline tool testerrrr can be used to test the journey planner itself. ./testerrrr -r makes a random request. The "webbased" API is compatible with OpenTripPlanner. Using "cherokee" in our repository in the handler_rrrr branch you will be able to start it.

We don't have any installation guidelines yet, but they will be available shortly.

@bambax
Copy link
Author

bambax commented Mar 30, 2014

Okay yes ./testerrrr -r works and makes requests, although it's hard to distinguish the query from the response.

Monitoring ports 9292|9293 with tcpdump -A shows a bunch of JSON objects being passed around, but again, it's unclear what's what.

Trying to use ./testerrrr --from-idx <stop_id> --to-idx <stop_id> with <stop_id> coming directly from the column of the same name in output.gtfsdb in the stops table, only results in the response "Dude, you are already there"... but obviously I'm not! ;-) (I also tried stop_name, to no avail).

(Also, testerrrr apparently tests every transfer for symetry (all >200 millions of them) on every run, which makes it a little slow to use).

If I could use testrrrr by sending it two stop ids and getting a readable JSON response, it would be enough for testing purposes; if I could then do the same via http I would be very happy... ;-)

Thanks.

@skinkie
Copy link
Contributor

skinkie commented Mar 30, 2014

If you want I can help you setting up cherokee with bliksem, like it is on https://1313.nl/
Just send an e-mail ;)

@wjanssen
Copy link

@bambax:

Start the program otp_api. It will listen on port 9393. Then use "curl" to send it a request. For instance, using the Netherlands DB referenced in README.md,

$ curl 'http://127.0.0.1:9393/?to-idx=54864&from-idx=29164'

which should return a JSON representation of the trip plan. Look in parse.c/parse_request_from_qstring for the various attributes you can send in the HTTP request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants