Hi All,
We are attempting to integrate a WPS service into Geoserver 2.7.0 and have some
issues around resource management.
Briefly, our WPS Process involves,
- Implementing a GeoServerProcess that uses the execute() method to return
a class deriving from RawData.
- Implementing the RawData.getInputStream() method to return an InputStream
object. This object holds refs to a Geotools transaction object and a jdbc
connection taken from a Geotools jdbcdatastore. These resources are used to
consume and transform data - which is returned via calls on the InputStream's
read() methods.
We found that,
- During synchronous WPS calls, if the remote client prematurely terminates the
connection, there is no corresponding call back on the InputStream's close()
method. Without this notification we are unable to properly cleanup the
geotools transaction and jdbc connection resources.
- As soon as the InputStream is returned to the WPS executor, the job is marked
as complete, even though it may take many hours to process and stream all the
data. Additionally, any new WPS jobs are run immediately without respecting
queue limits.
With the above issues in mind, we modified our approach to use a
FileOutputStream created via resourceManager.getOutputResource(). The prevents
the WPS job from being prematurely marked as complete until all data is written
to the file. However it's not our preferred choice for web-browsers since
there's no indication of any connection/download activity.
We also used the ProgressListener to monitor job state, by testing the
progressListener.isCanceled() while processing. However we noticed,
- That if the remote client disconnects we still don't get notification of
completion via the ProgressListener.
A couple of other minor issues,
- timeouts begin from the time the job is queued, not the time the job run is
started.
- It's not possible to set the max synchronous jobs to zero via the GUI as an
indirect way to disable synchronous WPS jobs
Any advice would be greatly appreciated,
Cheers,
Julian
University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access,
disclosure, copying, distribution, or reliance on any of it by anyone outside
the intended recipient organisation is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the
sender. The views expressed in this email are not necessarily the views of the
University of Tasmania, unless clearly intended otherwise.
------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel