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

OSRM 4.x API is deprecated and will stop working soon #830

Closed
danpat opened this issue Sep 2, 2016 · 10 comments
Closed

OSRM 4.x API is deprecated and will stop working soon #830

danpat opened this issue Sep 2, 2016 · 10 comments
Labels

Comments

@danpat
Copy link

danpat commented Sep 2, 2016

It looks like your code is referring to the OSRM demo server:

public static final String DEFAULT_MATCH_SERVICE_URL = "https://router.project-osrm.org/match";

Please note that this API endpoint will disappear in the near future (within weeks or sooner). This deprecation was announced on the OSRM mailing list more than 6 months ago.

Please see the API documentation at https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#service-match for details on how to use the OSRM 5.x API instead.

@vitalidze
Copy link
Owner

Thank you for noting this. I already received similar feedback from a user of my system. Looks like I will have to support both versions of the API because I already have some installations with previous versions, which don't have restrictions on 100 points per request. BTW, is this restriction still exists for the new version of the API?

@vitalidze vitalidze added the bug label Sep 4, 2016
@danpat
Copy link
Author

danpat commented Sep 4, 2016

@vitalidze Yes, there is still a default limit, but it can be changed when you launch your own server. Our demo server at router.project-osrm.org will always have the limit in order to restrict CPU usage by users (more coordinates == more CPU intensive requests == DOS attack vector).

@vitalidze
Copy link
Owner

I see, this limit is understandable. From my previous look the only way to change it was to update some constant inside source code and then rebuild whole project. Is something changed since then?

Thank you very much for spending time answering me and posting information. It's really appreciated.

@danpat
Copy link
Author

danpat commented Sep 4, 2016

Yes, it's a runtime configuration option for osrm-routed now:

$ ./osrm-routed
[info] osrm-routed <base.osrm> [<options>]:

Options:
  -v [ --version ]                      Show version
  -h [ --help ]                         Show this help message
  --trial [=arg(=1)]                    Quit after initialization

Configuration:
  -i [ --ip ] arg (=0.0.0.0)            IP address
  -p [ --port ] arg (=5000)             TCP/IP port
  -t [ --threads ] arg (=8)             Number of threads to use
  -s [ --shared-memory ] [=arg(=1)] (=0)
                                        Load data from shared memory
  --max-viaroute-size arg (=500)        Max. locations supported in viaroute
                                        query
  --max-trip-size arg (=100)            Max. locations supported in trip query
  --max-table-size arg (=100)           Max. locations supported in distance
                                        table query
  --max-matching-size arg (=100)        Max. locations supported in map
                                        matching query

Set any of those --max-* values to 0 to make them unlimited.

@vitalidze
Copy link
Owner

Thank you. That's great. Hope I will find some time to implement your new API.

vitalidze added a commit that referenced this issue Sep 15, 2016
@vitalidze
Copy link
Owner

@danpat I have started implementing new version of the API. I have couple of questions:

  1. Is old API already removed from the demo server? It shows me the following error:

XMLHttpRequest cannot load https://router.project-osrm.org/match. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.10.4:8888' is therefore not allowed access.

  1. According to the documentation https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md new API supports only GET requests. However there are cases, when number of points will exceed, for example, when track is loaded for several days. What should be done in such case? Previously I used POST request. Is it supported now?

vitalidze added a commit that referenced this issue Sep 15, 2016
vitalidze added a commit that referenced this issue Sep 20, 2016
vitalidze added a commit that referenced this issue Sep 20, 2016
@jolypas
Copy link

jolypas commented Oct 20, 2016

hello

Is there a working URL for OSRM now to put into traccar web ui ?

the dault one :

https://router.project-osrm.org/match

says

The OSRM Demo server has moved to API Version 5. Documentation for the new version can be found at https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md

@vitalidze
Copy link
Owner

@jolypas You can set up your own instance of project-osrm server with API version 4.

@vitalidze
Copy link
Owner

Implemented support for v5 API, written news, updated latest and demo versions.

@jolypas
Copy link

jolypas commented Dec 17, 2016 via email

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