WPS icon indicating copy to clipboard operation
WPS copied to clipboard

Add support for algorithm progress

Open nuest opened this issue 9 years ago • 2 comments

An R algorithms should be able to communicate it's progress to the WPS. First idea: Provide a well known file/variable ALGORITHM_PROGRESS in the work directory that the WPS reads when it requests the progress / status of an algorithm. The content of the file is a single number which is the percentage of the algorithm progress.

The R process uses a set of provided functions to write to this file, see https://github.com/52North/WPS/blob/dev/52n-wps-webapp/src/main/webapp/R/utils/wpsStatus.R

The problem with the file based approach is that this will not support remote Rserve-deployments. Alternatively, the WPS would have to check that variable every other line, or maybe every 10th line?

Check also out the Shiny progress indicator object: http://shiny.rstudio.com/articles/progress.html

Further alternative: overload the existing R progress indicator so that it stores the information also in the aforementioned file, see https://stat.ethz.ch/R-manual/R-devel/library/utils/html/txtProgressBar.html

nuest avatar Dec 08 '14 10:12 nuest

I would vote not to implement a file based approach as I've seen the problems with assuming shared filesystem access in the WPS. I'd prefer if the two were more fully separated so that all communication between the R process and the WPS process occurred via the open socket. This is just my preference as a user with a remote Rserve deployment.

jiwalker-usgs avatar Dec 08 '14 20:12 jiwalker-usgs

Ok - so that decisions seems settled. When working on this issue one should take due care to evaluate potential performance issues, though I imagine this should not be an issue - the majority of the time will most probably reside in the actual process execution, not in the communication between WPS and RServe.

nuest avatar Dec 09 '14 08:12 nuest