Add multithreading/async for all requests #304
Labels
brainstorming
Idea for a potential new feature or adaption that still needs further discussion
comments welcome
Indicates that the creator of this PR is open for early review comments
enhancement
New feature or request
user requirement
Requirement
The user wants to request one or more indicators for one ore more layers for multiple geometries.
Current Situation
The user has to do all optimisation at her end (e.g. asynchronous requests). Most users will use a very ineffective loop approach:
For an example see https://gitlab.gistools.geog.uni-heidelberg.de/giscience/ideal-vgi/osm-element-vectorisation/-/blob/6a65893fdaaa5cad97f4b1d7cf7fdc1701e89287/src/osm_element_vectorisation/indicators/surrounding/ohsome/oqt.py
Possible better (more performant) solution
Use
group-by(geometry/indicator/layer)
orfor async(geometry/indicator/layer)
approach to allow users to request multiple geometries at once. Multiple geometries are currently possible, what is the approach here?This would require user friendly error handling, where the request only fails, if all geometries fail but returns partial responses, whenever possible.
Related: #151 and GIScience/ohsome-py#37
The text was updated successfully, but these errors were encountered: