Open GoogleCodeExporter opened 9 years ago
a) yes it is possible if you implement a jsp or servlet on the server which
gets commands from webstart applications via sockets or http requests. Your jsp
or servlet runs R codes and returns the result to webstart in same way.
b) each single Rcaller instance creates its own Rscript process indepently, so
a multithreaded application can be created. Only the one R installation is
required. Running multiple RCaller instances simultaneously would be slow
depending on the number of cores and amount of memory. Note that the 'being
slow' is a result of creating external processes and runtime lags are related
to R itself.
Hope it helps.
Original comment by mhsatman
on 25 Apr 2014 at 9:37
Hi,
Instead of using jsp/ servlets to make a web application, I'm planning to
deploy my application as a Java Web Start.
For RCaller to work within it, do I need to have R installed on every client
machine and use it's local path for RscriptExecutable or can I have R on a
central server and have the RscriptExecutable path point to Rscript.exe on that
server ?
Original comment by ajrulez....@gmail.com
on 29 Jul 2014 at 2:33
[deleted comment]
Note: I tried placing my R folder inside Tomcat's webapps/ROOT and using the
remote server's url and port (80) in my code using:
caller.setRscriptExecutable(http://**.***.***.***:80/R/R-3.0.1/bin/x64/Rscript.e
xe);
However, this resulted in the following exception:
rcaller.exception.RscriptExecutableNotFoundException: R executable
http://**.***.***.***:80/R/R-3.0.1/bin/x64/Rscript.exe not found
I then modified my code and tried to execute Rscript.exe using
**Runtime.getRuntime().exec(http://**.***.***.***:80/R/R-3.0.1/bin/x64/Rscript.e
xe);** but that resulted in the following exception:
java.io.IOException: Cannot run program
"http://**.***.***.***:80/R/R-3.0.1/bin/Rscript.exe CreateProcess
error=2, The system cannot find the file specified
If I use the above url in my browser, I can successfully access the Rscript.exe
file.
Could this error be occurring because of the Windows Firewall ? While setting
up Tomcat, I had added a new inbound rule for port 80 (for Tomcat). Do I need
to add a rule for outbound access on port 80 as well ? I do not understand why
I can access Rscript.exe in my browser but cannot do the same from within my
java application.
Any suggestions on how to fix this would be very helpful. Thanks.
Original comment by ajrulez....@gmail.com
on 31 Jul 2014 at 12:03
@mhsatman:
"a) yes it is possible if you implement a jsp or servlet on the server which
gets commands from webstart applications via sockets or http requests. Your jsp
or servlet runs R codes and returns the result to webstart in same way."
Regarding your suggestion above, do you have any examples on how to implement
RCaller in a servlet and call it from a Java desktop or Web Start application
instead of a jsp page ? I need to pass a 2d array (double[][]) from my Java
code to the servlet, run RCaller in the servlet and return response in the form
of a double[] array. Is this possible ? Kindly let me know soon.
Thanks.
Original comment by ajrulez....@gmail.com
on 1 Aug 2014 at 12:21
Original issue reported on code.google.com by
ajrulez....@gmail.com
on 17 Mar 2014 at 10:19