rserve

Store large data or a service connection per Flask session

独自空忆成欢 提交于 2020-01-25 08:16:59
问题 I'm writing a small Flask application and am having it connect to Rserve using pyRserve. I want every session to initiate and then maintain its own Rserve connection. Something like this: session['my_connection'] = pyRserve.connect() doesn't work because the connection object is not JSON serializable. On the other hand, something like this: flask.g.my_connection = pyRserve.connect() doesn't work because it does not persist between requests. To add to the difficulty, it doesn't seem as though

HAProxy Loadbalancing TCP traffic

别来无恙 提交于 2019-12-31 09:05:12
问题 Using HAProxy, I'm trying to (TCP) load balance Rserve(a service listening in TCP socket for calling R scripts) running at port 6311 in 2 nodes. Below is my config file. When I run HAProxy, its statting without any issues. But when I connect to the balanced nodes, getting below error. Anything wrong with the config? Handshake failed: expected 32 bytes header, got -1 #--------------------------------------------------------------------- # Global settings #--------------------------------------

How do you run RServe on AWS Lambda with NodeJS?

时光毁灭记忆、已成空白 提交于 2019-12-25 12:08:15
问题 While this question is quite open-ended, I'm generally trying to follow this excellent post here: https://aws.amazon.com/blogs/compute/analyzing-genomics-data-at-scale-using-r-aws-lambda-and-amazon-api-gateway/ which describes setting up R to run with python. I, on the other hand, am trying to get R to work with NodeJs. I've packaged up my dependencies, deployed to Lambda, and can run simple Node scripts. However, I am having difficulty connecting to RServe from Node using the npm package Rio

plot graphics result for example association rules via “aruleViz” from java code using Rserve

廉价感情. 提交于 2019-12-25 07:59:53
问题 I have written an R function, that connect to database, fetch some records, obtain association rule of the object via arules library and plot the rules using arulesViz . I save the R function in an script file, named associationRule.R. plotAssociationRule = function(){ library(arules) library(RJDBC) jdbcDriver <- JDBC(driverClass="oracle.jdbc.OracleDriver", classPath="lib/ojdbc6-11.2.0.2.0.jar") jdbcConnection <- dbConnect(jdbcDriver, "jdbc:oracle:thin:@//172.16.1.133:1521/oradb", "hr_midhco"

How to Start RServe pre-loaded with library

大城市里の小女人 提交于 2019-12-25 04:50:14
问题 I need to load a library every time I am making a new RConnection. Is it possible to have it pre-loaded when I start RServe? Loading it every time a new RConnection is making it slower. 回答1: Yes, you can use eval or source configuration options or --RS-source <file> command line option. Anything you load this way is pre-loaded into the server before it starts listening for connections. 回答2: It might not be working because you're missing the quotes around the library name. Another way to do it

What is folder (null).1001.1001

99封情书 提交于 2019-12-25 04:33:34
问题 (null).1001.1001 What is this folder? Where does it come from? drwxrwxrwx 49 appusr appusr 4096 Jan 7 21:52 (null).1001.1001 I think it has something to do with Mr. Root impersonating Mr. AppUsr in a background task, but I posted to AskUbuntu last week, and nobody there recognized it. Why am I asking? Well ... On an Ubuntu box, I have a restricted-access applications user who is uid 1001 and gid 1001 . Root launches Rserve under that user during boot. The Rserve session is writing into a

How to Shutdown Rserve(), running in DEBUG

♀尐吖头ヾ 提交于 2019-12-25 02:31:38
问题 I have started Rserve() from within RStudio on my Mac in debug mode with the following: Rserve(debug=TRUE,args="--no-save") And as a result, I get the message: Note: debug version of Rserve doesn't daemonize so your R session will be blocked until you shut down Rserve. This is fine & good, until I've finished with using Rserve in debug mode. How can I send an interrupt in order to gracefully shutdown Rserve() ? Thanks! 来源: https://stackoverflow.com/questions/24004257/how-to-shutdown-rserve

How to close Rserve from the command line

倾然丶 夕夏残阳落幕 提交于 2019-12-23 09:17:08
问题 this question relates to close connection and perhaps also to this close Rserve. However, in the later case there are connections open and in the first case the answer does not specify how to "kill" the server. It is important to say that I am new to Rserve, and I have used it for the 1st time today for some mild R-python interaction. I started Rserve from the command line as: % R CMD RServe I though I had closed the connection after the session, but when I now try to re-start Rserve again

Running R script from java - Rconnection eval exception

只愿长相守 提交于 2019-12-23 05:37:10
问题 How can I solve this problem? I tried to empty cache, reinstall R and Rscript. connection = new RConnection(); String path = "source('" + rScript.getFile().getAbsolutePath() + "')"; connection.eval(path); // error in this line org.rosuda.REngine.Rserve.RserveException: eval failed In a source file, I have this code functionName <- function(param1, param2, ..., paramN){ #some code here } If I remove functionName <- function(param1, param2, ..., paramN){ definition part - it works. Also in R

Running R Code remotely from java application

白昼怎懂夜的黑 提交于 2019-12-23 04:22:16
问题 I need to run R Code from Java application. The R Server is installed on the remote box. I failed to find any information on Java connector for R. Maybe I am just exposing my ignorance, but any hints how this can be done would be appreciated. 回答1: There are sample Java clients in the Rserve source packages. I'd point to a SVN browser but I can never remember if Simon's RForge has a SVN browser... Here is a tree view of the client from the older package I maintain in Debian (but you probably