[Zoo-discuss] Execution time of a raster echo service

Fenoy Gerald gerald.fenoy at geolabs.fr
Thu Dec 10 00:04:34 PST 2015


Dear Adrien,
thanks for coming back on this issue.


> Le 9 déc. 2015 à 16:47, Adrien ANDRÉ <adr.andre at laposte.net> a écrit :
> 
> Dear Gérald,
> 
>> I do apologie to answer one more time by another question, but I would like to know if you are requesting your service asynchronously or synchronously ? If yes then you should have set the status and storeExecuteResponse attributes of the ResponseDocument node to true in your request, right ? If you did, then you should not wait until the service execution end before having an answer by the server. In fact, you won’t even wait for the server to decode your base64 image.
> 
> It's indeed an asynchronous request:
> <wps:ResponseDocument lineage="false" storeExecuteResponse="true" status="true">
> 
> waiting for the process to complete, i retrieve the status file which, as expected, doesn't change while base64 decoding.

If you setup the getStatus service (or you are using WPS 2.0.0 version) then you should have access to a GET  Execute request invoking the getStatus service (or the GetStatus request itself in case of WPS 2.0.0).

> 
>> I suppose that the issue is with the base64 decoding which is taking too much time. To make sure it comes from here, you may try to first store your raster file somewhere then pass it by reference to your service, this way you will avoid passing through the base64 decoding process.
> 
> Would you mind guiding me on performing a file transfer by reference or do you know documentation about it?

It is easy to use reference, you may find examples in cptestijg, one can be this request [1]

> 
> Would it mean a client has to locally set up a web server?

The test I invited you to do was simply to confirm that the issue is in the base64 decoding part, once we are sure we can see if something can be optimized here.
In other case, if you want the user to share its content using reference, then yes you may need them to setup web server or a ftp server.
Nevertheless, you may also think of using the upload service from MapMint python services  (in the mapomint-services/upload directory) this one take the file as it is and store it on the server side. Once uploaded you may refer to this file and use it as a reference for running your service.

> 
> 
> Thanks again!
> 
> Kind regards,
> 
> Adrien

I suppose that you don’t have to use the upload service, first we should make sure that the time was spent in the base64 decoding section.

I hope it helps and to hear back from you,
Best regards,

[1]  https://github.com/WPS-Benchmarking/cptesting/blob/master/requests/ir2_o.xml


Gérald Fenoy
http://wiki.osgeo.org/wiki/User:Djay



More information about the Zoo-discuss mailing list