WPS
WPS copied to clipboard
Add support to spawn Java processes
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
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...
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