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

Try PBF in-/output #23

Open
nilsnolde opened this issue Nov 16, 2022 · 1 comment
Open

Try PBF in-/output #23

nilsnolde opened this issue Nov 16, 2022 · 1 comment

Comments

@nilsnolde
Copy link
Member

nilsnolde commented Nov 16, 2022

For maximum performance & output information we could try protobuf in-/output optionally. Probably quite a bit of work, if we want to do it properly, so I’d first try to benchmark the HTTP service to see if it’s worth it. Also, would be much nicer if all endpoints are protobuf compatible, e.g. matrix/isochrone & expansion are not. (matrix I PRd recently)

@nilsnolde
Copy link
Member Author

I thought about this a bit more. This is also smth we might want on routingpy, and to not duplicate code big time:

  1. Create a new repo to rule Valhalla PBF bindings for all languages, e.g. python, js (others can add more)
  2. Thin inherited class of the Api object of the PBF bindings with some convenience functions like get_total_time, get_total_shape etc
  3. GHA workflows to build the PBF bindings from upstream Valhalla:
  • Ideally webhook from upstream Valhalla which triggers a new build in this repo (seems possible)
  • protoc compile the PBF bindings for each language, commit to the repo's master, while recording the upstream commit hash
  • (optionally) package the bindings plus the wrapper code as wheel/npm package and upload

I'd start with python, add JS at some point (would be nice for routing-js as well), and then add languages as we encounter more need.

This way we could simply submodule this new repo and have an easy way to work with the PBF output, which can seem daunting a bit when not being used to protobuf in general.

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

No branches or pull requests

1 participant