FastRWeb is an infrastructure that allows any webserver to use R scripts for generating content on the fly, such as web pages or graphics. URLs are mapped to scripts and can have optional arguments that are passed to the R function run from the script. For example http://my.server/cgi-bin/R/foo.png?n=100 would cause FastRWeb to look up a script foo.png.R, source it and call run(n="100"). So for example the script could be as simple as
run <- function(n=10, ...) {
p <- WebPlot(800, 600)
n <- as.integer(n)
plot(rnorm(n), rnorm(n), col=2, pch=19)
p
}
and thus the above URL would show a plot.
FastRWeb can be run on any webserver that supports either CGI or PHP. As of version 1.1 it can be also used directly with the built-in webserver in Rserve 1.7 and higher. It uses Rserve as a back-end which allows very fast responses as there is no need to start R for each request. Also Rserve and allows to pre-load data and packages into the server which is important for live monitoring and reporting. This allows FastRWeb scripts to be used for time-sensitive tasks like tooltips or live search as you type.
The original FastRWeb paper was presented at IASC 2008 and is available here as PDF.
Please read the INSTALL file in the package for installation instructions!
|