WPS icon indicating copy to clipboard operation
WPS copied to clipboard

Add support to spawn Java processes

Open nuest opened this issue 8 years ago • 2 comments

Even Java processes could run in their own virtual machine to run the actual process outside of the servlet container (e.g. Tomcat). This might be better suited for large data analysis (large RAM usage, stopping processes, big data, ...), because to handle this now the Tomcat would need to take all the RAM.

@bpross-52n Please correct me if I'm missing something here :-).

Some background and useful examples:

  • http://zeroturnaround.com/rebellabs/how-to-deal-with-subprocesses-in-java/
  • http://stackoverflow.com/questions/931536/how-do-i-launch-a-completely-independent-process-from-a-java-program
  • http://stackoverflow.com/questions/2006035/how-to-create-a-process-in-java

nuest avatar Nov 23 '15 13:11 nuest

How would you like to automate this? I mean it's basically a call to Runtime#exec(), but if you would like to provide some framework method for this or even run every algorithm in it's own process, you will have to manage the classpath... I think that will be quite painful...

autermann avatar Nov 23 '15 13:11 autermann

Good points. And yes, the idea would be that every algorithm execution runs it it's own process.

Please not this is just an idea that came up in a discussion with a data modeller. My first reaction was: "this is not a WPS task but we would forward this to special frameworks"...

And maybe everything becomes easier in Java 1.9 anyway > http://openjdk.java.net/jeps/102

nuest avatar Nov 23 '15 14:11 nuest