-
Notifications
You must be signed in to change notification settings - Fork 117
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
Improve database management, files storage management and sub-process management #662
base: main
Are you sure you want to change the base?
Conversation
Move the process management logic from Process to Service. This make more sence that process does not manage then self and are used only for running.
The FileLock is th elock that is usable accross several process, this overcome the limitation of multiprocess.Lock.
45e3960
to
f6fa83f
Compare
I tried testing with https://github.com/bird-house/emu (a test and demo servier) and all processes failed. |
I will have a look, Thanks for feed back :) |
Hello, after a first look I gather two issue. The first one is fixed by gschwind/pywps-emu@6e4e3aa and it's due to change that make request url ends with /wps when wps is made, to separate /files or /status request. I may change that by using service query parameter instead, as exemple. The second issue that I found is related to the new Storage handle, I do not store file immediately in the storage when we use code such as |
Hello, I did fixed more test regarding previous comment here : https://github.com/gschwind/pywps-emu/commits/update-test I have also some update to fix outputs storage, but I need to fix issue for inputs. I will try to fix it and update the branch once I got something that I'm confident with it. And I still have the test test_wps_ncml.py that I cannot fix, and that is invalid test in my opinion, it tries to retrieve data from not-existing server. Thus the test should be rethinked using client.get(...) instead of d3.retrieveData() Best Regards. |
Hello, I working on replacement of this patch suite, the first part is in #667 Best regards |
Overview
This patch series include many change to have a even better handle of sub-process. The patch series include:
Missing peace:
More detail on patches series
Storage Back-end rewrite:
The rewrite of back-end storage, simplify the API of back-end storage by only allowing read and write and does not provide particular API for one or another Storage type (for example I removed the copy/move optimisation). Now files in the back-end storage may be exported. If they are exported they can be downloaded via /files endpoint using it's identifier. I did not implemented the S3 back-end because I can't test it, but I think there is nothing that blocking the implementation of the new API.
Multiple end-point:
This allow to implement dynamic status, and to manage files output via Storage back-end. There is no more direct file access, all files download goes through /files URL.
New locks scheme for databases.
The current lock scheme does not work, the filelock scheme is 100% safe in some setup, in particular one WPS server that access to the database. The filelock will not work if some process that is not aware of file lock try to access to the database or if the database is shared within several sever. I did not found a 'standard' lock method that is shared accross several database back-end thus I implemented this one.
I currently use this implementation on our server.
Best regards
Related Issue / Discussion
Additional Information
This contribution is supported by MINES ParisTech.
Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)