Skip to content
Prev 37495 / 63424 Next

Rserve graphics output [Was: R-devel Digest, Vol 90, Issue 20]

On 22/08/10 17:55, Simon Urbanek wrote:
That's handy for serving graphics.
(But "Yuk ! Hack !" about having to open a device in /dev/null).
If considering R to serve graphics, there are two main strategies: fire 
up an R process each time, or keep an R process alive to answer request. 
Both will likely have to be done by something else than R (<put your 
language of choice for web development here>), and if R can be embedded 
in that language this will likely be easier (no need to work out a 
communication interface) and possibly faster (depends on the language 
discussed and of the quality of the embedding).
In that scenario, you do not need RServe at all: Python is handling 
everything. For example, the combo Django (web framework in Python) + 
rpy2 has been used to deliver R results (including graphics) through the 
web.
Fancy strategies such as managing a pool of R instances if talking heavy 
web traffic, persistent sessions, etc... can also be implemented.


Best,


Laurent