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

multiple occurrences of query params in RoutingResource no longer used #1770

Closed
abyrd opened this issue Feb 25, 2015 · 3 comments
Closed

multiple occurrences of query params in RoutingResource no longer used #1770

abyrd opened this issue Feb 25, 2015 · 3 comments

Comments

@abyrd
Copy link
Member

abyrd commented Feb 25, 2015

RoutingResource is pretty complicated because it can create multiple "differential" requests, where each query parameter can be specified more than once. The point was to A) provide a view of isochrone tiles and other analysis tiles as if the documents "already existed" with the server calculating the SPTs on demand and cacheing them, and B) allow comparing multiple such requests at once where only one or two query parameters differed between the two requests to be compared.

Our approach to this kind of work has shifted quite a bit: see Pointsets and Time Surfaces. In order to quickly perform multiple requests and combine them, the server does need to hold on to SPTs. Rather than sending the same routing query parameters over and over e.g. for each isochrone tile, we submit them once and receive a name for the resulting SPT, which is then visible as a "document" in the web API. This reveals the inherently stateful nature of the operation to the user. These names persist, and the server should take care of re-generating the corresponding SPTs from the original request if and when another request comes in for the name but the SPT has been evicted.

Anyway, this means that multiple occurrences of query parameters are no longer used. With the new approach described above, one could just clone the query parameters in the calling client and change one or two fields, then request another named SPT.

Therefore the RoutingResource should be greatly simplified by removing all this code.

@abyrd
Copy link
Member Author

abyrd commented Feb 25, 2015

I'd also like to remove the hashcode and equals methods from RoutingRequest, giving it the default identity equality. The only reason for these awkward definitions was to make the LoadingCache work with RoutingRequests as keys. @mattwigway are you using these methods in any way, even implicitly (hashtables etc.) in Analyst cluster?

@JordenVerwer
Copy link
Member

Agreed, if we could get rid of that annoying piece of boilerplate, the process of adding new parameters to the API would be simplified significantly.

@abyrd
Copy link
Member Author

abyrd commented Oct 15, 2020

The current OTP2 code base does not seem to have this boilerplate, or allow for multiple instances of parameters (List fields). Closing.

@abyrd abyrd closed this as completed Oct 15, 2020
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

2 participants