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

Add graph version information to response #5115

Closed
gardster opened this issue Jun 21, 2018 · 4 comments
Closed

Add graph version information to response #5115

gardster opened this issue Jun 21, 2018 · 4 comments

Comments

@gardster
Copy link
Contributor

gardster commented Jun 21, 2018

I encountered such a problem while using OSRM: I have an OSRM cluster behind a load balancer that processes a continuous stream of requests. To update the road graph, I'm restarting servers one by one. At some point, several servers running with the old graph and some servers with the new one. As far as I understand, there is no way to find out on which version of the graph it was created from the OSRM answer. I suggest to add such field into the response. This can be a data timestamp from the pbf file, or the value of some parameter passed on the stage of osrm-extract.

@TheMarex
Copy link
Member

Can you say more about what the use-case there is? Why does the client need to know about the data version?

@gardster
Copy link
Contributor Author

Sure.
For example I have a "toll roads expenses" service. I have a matched tracks from the OSRM and some server with information about toll pricing. This server looks for toll roads in OSRM answer and returns prices if it can find toll boothes. So both services have geography information from the OSM (geometry, osm_ids and so on) and ideally need to deploy simultaneously. When someone make a vast graph modification and OSRMs answer has a different geometry than pricing server supposed it can lead to mistakes when the old pricing server tries to find objects on track. So we need additional information to be sure that all services works on same version of geography information.

@TheMarex
Copy link
Member

Ah interesting. So we did have something similar not too long ago but removed it because we did not have a use-case for it. 😅

To add this feature I would recommend the following steps:

@gardster
Copy link
Contributor Author

Thank you for the detailed description of necessary steps.

datendelphin added a commit to fossgis-routing-server/osrm-backend that referenced this issue Nov 19, 2020
  - Changes from 5.21.0
    - Build:
      - ADDED: optionally build Node `lts` and `latest` bindings [Project-OSRM#5347](Project-OSRM#5347)
    - Features:
      - ADDED: new waypoints parameter to the `route` plugin, enabling silent waypoints [Project-OSRM#5345](Project-OSRM#5345)
      - ADDED: data timestamp information in the response (saved in new file `.osrm.timestamp`). [Project-OSRM#5115](Project-OSRM#5115)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants