简体   繁体   中英

R - concurrent access , on server

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM