1

I am currently developing a small program in Java that will access R to perform some calculations and generate plots. I'm using RCaller as a bridge to R from within Java. I have tested my program with R installed on my machine and it works fine.

I then thought whether this would work if I had R set up on a remote web server (or on a network drive) and had several users on different machines use my program to access it at the same time ?

[RCaller background info.: RCaller requires me to initially specify a path for the Rscript executable file (Rscript.exe) found within the R installation, at the beginning of my code. RCaller then works by spinning up a new instance of RCaller every time we use it within Java].

This leads to wonder whether if I specify the location of the Rscript.exe file on a server, would this work ? My doubts lie around whether a central installation of R on a server would allow multiple users to access it concurrently or would each user have to wait for their turn ?

Does an R installation allow concurrent access when set up on a server ?

Any feeedback on this would be greatly appreciated.

Thanks.

jbytecode
  • 681
  • 12
  • 29
Ajit Singh
  • 115
  • 11
  • As far as I know, R can be instantiated for more than one instance. So it's very likely that when you have different calls to Rscript.exe, different R instances would be started and run at the same time. – lcn Jul 30 '13 at 16:51

1 Answers1

2

As the main developer of RCaller, I can say yes, RCaller will create a new instance of R in each invocation of method .runandreturnresult() so in your web application, each single client will get its own R instance. These instances are completely independent and do not share the same variable pool.

jbytecode
  • 681
  • 12
  • 29