[Rd] Using TCP/IP sockets in R

Jeffrey Horner jeff.horner at vanderbilt.edu
Wed Aug 16 16:55:33 CEST 2006


Mark Schultz wrote:
> Hi All:
>   I've examined the R documentation on sockets and while I can probably
> figure it out with a bit of experimentation, I wondered if anyone has
> some sample code they could send me. I'd like to use R
> as a statistics server to python clients. Is ist possible to have a
> multithreaded server in R?

To answer your last question, R doesn't provide thread capabilities, so 
one cannot write a multi-threaded server in R. Hence, Rserve, Rsoap, and 
Rapache (others?) deal with concurrency by using the fork() system call 
(not available on windows) which clones the parent process, to handle 
multiple clients.

-- 
Jeffrey Horner       Computer Systems Analyst         School of Medicine
615-322-8606         Department of Biostatistics   Vanderbilt University



More information about the R-devel mailing list