From simon.urbanek at r-project.org  Wed Oct 24 22:55:09 2012
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Wed, 24 Oct 2012 16:55:09 -0400
Subject: [Rd] concurrent requests (Rook,
	but I think the question is more general)
In-Reply-To: <508850F4.8090208@rug.nl>
References: <50882FC1.40608@rug.nl>
	<F8B3AAEF-822A-4970-BD6A-AB88FF8E8B9B@r-project.org>
	<50883CD9.1090509@rug.nl>
	<FEE1BFBC-494F-4CA6-BBE8-5F3D4D8559CD@r-project.org>
	<508845EB.2090007@rug.nl>
	<F1CBF6BC-B328-4298-9033-1859F04CD67B@r-project.org>
	<508850F4.8090208@rug.nl>
Message-ID: <3E5C503F-4CE8-4130-B255-011C20C7D438@r-project.org>


On Oct 24, 2012, at 4:35 PM, Richard D. Morey wrote:

> On 24/10/12 10:07 PM, Simon Urbanek wrote:
>> On Oct 24, 2012, at 3:47 PM, Richard D. Morey wrote:
>> 
>>> I'd be fine with the poor man's solution (maybe with tempfile()?) if I can get access to the local file via javascript. But I don't think I can, due to the security limitations of the browser. I may have to rethink this significantly.
>>> 
>> That should be no problem, you can have another R instance serving the monitoring page (or you can use Rserve's HTTP server and have just one instance with arbitrarily many connections as needed).
> 
> OK, I'm looking at Rserve. I get the impression that one needs to start a separate server, so it would be difficult to make this transparent to a user who installs my package and just wants to do an analysis with a GUI. It also appears that there is a separate binary install, at least on Windows, which would mean anyone using my package would need to install and run something separate. Is that accurate?
> 

Not quite - it is all in the Rserve package, many years ago we used to supply Rserve.exe just because it did not require installation of any packages, but we don't do that anymore. Typically Java GUIs use Rserve to run R - it's trivial to start it (e.g., there is the StartRserve.java example) so your GUI can start it and shut it down. I don't know how you are driving your GUI so this may or may not be a good way - on unix you get the benefit of parallel HTTP server, that's really all I was pointing out. BTW: if you are talking web-GUI then Rserve is great for that because the GUI consist simply of R scripts (see FastRWeb) - but I mat be thinking bigger than what you have in mind.

The point is that you need a separate monitoring process or threads. That process can be R, Rserve or any thing else.

Cheers,
Simon



[Rd] concurrent requests (Rook, but I think the question is more general)
Simon Urbanek