Are there any R-project packages that facilitate asynchronous network IO? I'm think here along the lines of Ruby's Eventmachine or Python's Twisted. If there are several such packages/libraries which is the best in terms of: - performance - features
+2
A:
First of all, R is single-threaded, so typically people try to use parallel computing approaches (see, for instance, the snow package). I don't think there's anything quite like Eventmachine or Twisted.
Check out the following:
- The "State of the Art in Parallel Computing with R" paper describes most of the approaches to parallel computing in R (http://www.jstatsoft.org/v31/i01/paper). There are many useful packages in the HighPerformanceComputing view: http://cran.r-project.org/web/views/HighPerformanceComputing.html.
- Check out svSocket: http://cran.r-project.org/web/packages/svSocket/
- You can try using NetWorkSpaces with R: http://cran.r-project.org/web/packages/nws/.
- There are several examples of R servers. RServe: http://www.rforge.net/Rserve/
- The iBrokers packages is one of the only ones that I know which uses asynchonous requests. Have a look at the source code for that package (you can download it off R-Forge) and the related vignette: http://cran.r-project.org/web/packages/IBrokers/vignettes/RealTime.pdf
- The biocep project also includes many relevant features: http://biocep-distrib.r-forge.r-project.org/
Shane
2009-09-09 00:14:42