<div dir="ltr">Hi all,<div><br></div><div>I would like to talk with you about ticket #65 [1] and commit [2], which implements this feature.</div><div><br></div><div>There are two big changes in the branch. First of all: Process class now accepts "config" attribute - path to configuration file. In current master, the configuration file is read *after* the server is initialized - which is late [3].</div><div><br></div><div>Second big change is implementation of maxoperatios and parallelprocesses configuration options as described in attached image.</div><div><br></div><div>General idea is: there are two configuration options: maximum processes running on the server in parallel and maximum requests stored in queue.</div><div><br></div><div>The "queue" is implemented with help of SQLite database, where the incoming request is stored as serialized JSON string, when there is too many processes running in paralel. </div><div><br></div><div>Every process, once it's finished, it looks into database for processes stored in queue and if there is some, it takes it and continues with calculations.</div><div><br></div><div>I hope, you like the concept, and that everybody agrees with the proposed solution: store data into local database. Also number of running processes and number of stored requests is estimated based on records in database - is that ok for you?</div><div><br></div><div>Beside possibility of storing requests for later execution, this solution enables us also to kill running processes, based on the their UUID in the future (and I still hope for pausing).</div><div><br></div><div><img src="cid:1543f985d6f2d8000dd2" alt="pywps_maxoperations.png" class="GQ" style="max-width: 100%; opacity: 1;"><br></div><div><br></div><div>Database schema as it is now:</div><div><br></div><div><div>sqlite> .schema</div><div><br></div><div>-- table for logging all requests, their status and how did they work</div><div>CREATE TABLE pywps_requests(</div><div>                uuid VARCHAR(255) not null primary key,</div><div>                pid INTEGER not null,</div><div>                operation varchar(30) not null,</div><div>                version varchar(5) not null,</div><div>                time_start text not null,</div><div>                time_end text,</div><div>                identifier text,</div><div>                message text,</div><div>                percent_done float,</div><div>                status varchar(30)</div><div>            );</div><div><br></div><div>-- table for saving and restoring requets in to queue</div><div>CREATE TABLE pywps_stored_requests(</div><div>                uuid VARCHAR(255) not null primary key,</div><div>                request BLOB not null</div><div>            );</div><div><br></div></div><div>Anybody want's to test this? Little code review would not harm.</div><div><br></div><div>Any objections to put this to master?</div><div><br></div><div>Thanks</div><div><br></div><div>Jachym</div><div><br></div><div>[1] <a href="https://github.com/geopython/pywps/issues/65">https://github.com/geopython/pywps/issues/65</a><br></div><div>[2] <a href="https://github.com/geopython/pywps/commit/7c6875995d24fde77d60e8b5014c52c62bcc632e">https://github.com/geopython/pywps/commit/7c6875995d24fde77d60e8b5014c52c62bcc632e</a></div><div>[3] <a href="https://github.com/geopython/pywps/commit/7c6875995d24fde77d60e8b5014c52c62bcc632e#diff-1ab67f2df437e13a3ace4c4c031e1a68R33">https://github.com/geopython/pywps/commit/7c6875995d24fde77d60e8b5014c52c62bcc632e#diff-1ab67f2df437e13a3ace4c4c031e1a68R33</a> </div></div>