[Rd] Non-blocking Eval

Matthew Dowle mdowle at mdowle.plus.com
Wed Aug 11 15:39:38 CEST 2010


There is a video demo of exactly that on the data.table homepage :

http://datatable.r-forge.r-project.org/
http://www.youtube.com/watch?v=rvT8XThGA8o

However, last time I looked, svSocket uses text transfer. It would be really 
great if it did binary serialization, like Rserve does.

Previous threads :
http://r.789695.n4.nabble.com/Using-svSocket-with-data-table-tp924554p924554.html
http://r.789695.n4.nabble.com/Video-demo-of-using-svSocket-with-data-table-tp893671p893672.html

This one contains a comparison of Rserve and svSocket :
http://r.789695.n4.nabble.com/Fwd-Re-Video-demo-of-using-svSocket-with-data-table-tp903723p903723.html

Best, Matthew


"Philippe Grosjean" <phgrosjean at sciviews.org> wrote in message 
news:4C629AB7.60906 at sciviews.org...
> Hello,
>
> For non-blocking access to R through sockets, you should also look at 
> svSockets. It may be more appropriate than RServer for feeding data to R, 
> while you have another process running in R that do smething like updating 
> a graph, or some other calculations.
> Best,
>
> Philippe Grosjean
>
> On 20/07/10 14:10, Martin Kerr wrote:
>>
>> Sorry I phrased that badly.
>> What I'm trying to do is asynchronously add data to R, i.e. a program 
>> will periodically dump some readings to the Rserver and then later on 
>> another program will run some analysis scripts on them.
>> I have managed to add the data via CMD_detachedVoidEval as you suggested.
>> How exactly do I go about attaching to the session again? I know it 
>> involves some form of session key that comes back from the detach call, 
>> but what from does it take? And how do I use this?
>> Thanks AgainMartin
>>> Subject: Re: [Rd] Non-blocking Eval
>>> From: simon.urbanek at r-project.org
>>> Date: Mon, 19 Jul 2010 11:34:29 -0400
>>> CC: r-devel at r-project.org
>>> To: mk2391 at hotmail.com
>>>
>>> On Jul 19, 2010, at 10:58 AM, Martin Kerr wrote:
>>>
>>>>
>>>> Hello,
>>>> I'm currently working with the C++ version of the Rserve Client as part 
>>>> of a student project.
>>>> Is there an implementation of a non-blocking interface to Rserve in 
>>>> C++? I can find one via the Java JRI but no equivalent in C++.
>>>
>>> (Please note that stats-rosuda-devel is the correct list for this.)
>>>
>>> I'm not quite sure what you mean, because in JRI there is idleEval() 
>>> which is non-blocking in the sense that it doesn't do anything if R is 
>>> busy but that doesn't apply to Rserve as by definition R cannot be busy 
>>> there. There is no non-blocking interface to JRI - all calls are 
>>> synchronous.
>>>
>>> If your question is whether you can start an evaluation in Rserve and 
>>> not wait for the result then there is CMD_detachedVoidEval in Rserve, 
>>> but the C++ client only implements a subset of the API which does not 
>>> include that -- however, it is trivial to implement (just send a request 
>>> with CMD_detachedVoidEval as there is nothing to decode).
>>>
>>> Cheers,
>>> Simon
>>>
>>      _________________________________________________________________
>>
>> Do you have a story that started on Hotmail? Tell us now
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
>



More information about the R-devel mailing list