MeteoIO web service
A basic proof of concept for a MeteoIO web service can be found in branch "feature/web-service"
It is built on the following libraries:
- Web Framework: https://oatpp.io/
- XML parser: https://github.com/svgpp/rapidxml_ns
- libzip for zipping the results: https://libzip.org/
State of development: Currently, only WPS Execute commands and simple GETs to get the result.zip are supported. For the execute command, only sync requests are supported and data can only be sent as string (not as base64 string or reference).
For each execute request, a jobId is generated. For every jobId, a folder is created to store the input and output files.
Supported endpoints:
- POST /wps
- GET /results/{jobId}/result.zip
Usage example: An example of how to use the service can be found in the tests: meteoio/tests/web
- webservice_test_input.xml: example WPS xml file including inputs
Open issues:
- Docker image not working yet: The files sent via XML (e.g. ini files and smet files) cannot be written in Docker. Locally it works.
- Docker file cannot be built and pushed within the CI pipeline until the Container Registry feature is activated (ticket was created for wsl helpdesk on 13.06.22)
- Docker file uses huge gcc image instead of alpine. I used gcc for simplicity because I already had the release from the pipeline.
- Sending empty XMLs to "POST /wps" results in a segmentation fault and the process terminates (despite a try/catch block being present)
- While wget and Postman work fine, curl shows an error "Received HTTP/0.9 when not allowed". Oat++ shouldn't be HTTP/0.9, so curl seems to try something that is not supported.
- Currently, the folders created for each jobId are not deleted. A separate process or thread should regularly delete folders older than a certain amount of time (e.g. 2h).
Edited by buergiss