Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant