Questions tagged [rapache]

rApache is a project supporting web application development using the R statistical language and environment and the Apache web server

rApache is a project supporting web application development using the R statistical language and environment and the Apache web server. The current software distribution runs on UNIX/Linux and Mac OS X operating systems. Apache servers with threaded Multi-Processing Modules are now supported, but the the Apache Prefork Multi-Processing Module is still recommended (refer to the Multi-Processing Modules chapter from Apache for more about this).

The rApache software distribution provides the Apache module named mod_R that embeds the R interpreter inside the web server. It also comes bundled with libapreq, an Apache module for manipulating client request data. Together, they provide the glue to transform R into a server-side scripting environment.

Another important project that's not bundled with rApache, but plays an important role in server-side scripting, is the CRAN package brew. It implements a templating framework for report generation, and it's perfect for generating HTML on the fly. It's syntax is similar to PHP, Ruby's erb module, Java Server Pages, and Python's psp module. brew can be used stand-alone as well, so it's not part of the distribution.

Project home page : http://rapache.net/index.html

68 questions
2
votes
1 answer

Installing RApache in Ubuntu 16.04 Apache/2.4.18 (Ubuntu): I get some errors

I am trying to install RApache in Ubuntu 16.04 Apache/2.4.18 (Ubuntu) but I get some errors: 1- First when i install some packages: sudo apt-get install apache2-prefork-dev apache2-mpm-prefork libapreq2-dev r-base-dev I get an error message: Package…
2
votes
1 answer

Is opencpu useful as an API called by a web service?

Hi Opencpu is a really cool tool. But now I want to use a Data Processing Unit (DPU) in a web-service. Can it be used in a production environment where there are lots of requests which call r functions and scripts which only require a short amount…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
2
votes
1 answer

OpenCPU: how to change the default port?

Is there a way to have OpenCPU listening on a port different from :80? It should be easy using Docker, but I'm running a dedicated Ubuntu machine as recommended here. ps. I'm only using opencpu-server without opencpu-cache and so without nginx.
Maurizio
  • 547
  • 5
  • 13
2
votes
1 answer

Problem Configuring RApache on OS X 10.5.8

I've been trying to get RApache set up properly on my Macbook Pro running OS X 10.5.8. After installing RApache successfully (I think), I added the following to the httpd.conf file as suggested in the manual. LoadModule R_module…
Chris
  • 3,109
  • 7
  • 29
  • 39
2
votes
1 answer

How to flush current output in RApache?

I'm testing using RApache as an SSE (Server Sent Events) and similar (long poll, comet, etc.) back-end. I seem to be stuck on how to flush my output. Is it possible? Here is my test R script: setContentType("text/plain") repeat{ …
Darren Cook
  • 27,837
  • 13
  • 117
  • 217
2
votes
1 answer

R packages inaccessible via "opencpu knitr app"

I started playing with OpenCPU a couple of weeks back and am getting hooked to it. I was able to succesfully install the "knitr" and "opencpu.demo" apps. The issue I am running into is when I try to invoke the R functions I packaged under a new r…
2
votes
1 answer

Memory requirements when hosting R in the cloud

What is the minimal size server we need to run opencpu, if we expect 100,000 hits a month? I think opencpu is an exciting project, but need to know about memory usage when opencpu is deployed, since a cloud hosting service such as rackspace charges…
2
votes
0 answers

Errors in Deploying Rapache and Rook

I am trying to create a web application using R and Rook. I saw this example http://www.road2stat.com/cn/r/rook.html and I have been able to replicate it in my command line (Calling it from inside R). But I want multiple users to be able to connect…
Tony
  • 31
  • 1
  • 4
2
votes
1 answer

How do I plot a function formatted as a string in R

I am building an application with RApache and my code in R is receiving POST data. One of the post datas is POST$f which is a string- say "sin(x)". Is there any way to put this into the plot function successfully? Thanks!
Nick Trileski
  • 151
  • 1
  • 2
  • 8
1
vote
1 answer

How to set a custom HTTP status code from inside OpenCPU R function

I have an R function on OpenCPU (provided from OpenCPU docker image: https://hub.docker.com/r/opencpu/rstudio/) which filters data by some criterias. If there is no data to return I want to send a message (No data) with 204 status code. How can I…
1
vote
1 answer

Who manages (creates, allocates memory, etc.) R sessions / R processes within OpenCPU?

We have an OpenCPU cloud server, installed on a RedHat server with Apache 2.0 and rApache, which runs some quite memory- and processing-intensive calculations. Our app runs rather slowly (slower than on a less powerful laptop) - we think this is…
Milica
  • 23
  • 7
1
vote
1 answer

Which user is running the R on OpenCPU server side?

I'm inexperienced in using opencpu as a server and so I tried to find a answer to this in the documentation but did not found any answers to this question. Never the less this seems quite basic to me in terms of permission and authentication, so I…
HolgerBarlt
  • 307
  • 1
  • 18
1
vote
0 answers

Brew package, rapache, not interpreted code for R

I have installed rapache, and created the r.load and r.conf files in /etc/apache2/mods-available. in r.conf I have placed the following lines. SetHandler r-script RHandler sys.source And similary, for RApacheInfo. So far…
Jose N
  • 151
  • 2
  • 7
1
vote
1 answer

.htaccess redirect URL with id param to human friendly URL

I'm trying to create a URL redirect but so far everything I have tried just hasn't shown any effect on the site. I know ModRewrite is enabled as there are other rewrites taking place. The whole purpose of this is to handle old URLs from the former…
diggersworld
  • 12,770
  • 24
  • 84
  • 119
1
vote
0 answers

Is that possible to use Yii2 + MySql in Rapache server?

I have yii2 project and use R code for report and image generation. I use PHP exec() + Rscript for now. But it has some issue like ONLY ONE USER can be using the web app at a time. i try use PHP exec() Parallel Processing approach : exec("Rscript…
Galang Re
  • 215
  • 1
  • 4
  • 12