Talking to C# API (Any reference to learn the same)
On Sat, Oct 11, 2014 at 12:04 PM, Mark Knecht <markknecht at gmail.com> wrote:
On Sat, Oct 11, 2014 at 8:13 AM, Kunal Shah <kunalshah305 at gmail.com> wrote:
Hello, I have 250 R scripts. *Input* Each of them needs a real time data feed from a C# interface. The real time datafeed updates at a speed of approx 3 times a second. Also the data array size is increasing every minute. (1 minute time frame) *Output* I want to output say 4 variables from each of the R codes back to C# execution engine I wish to know the complete process. Can I get some references for the same? Since R cannot be multi threaded, can this be done easily? What is the best possible way?
While you may be working on a financial application, your question has nothing to do with finance, and is therefore off-topic for this list.
I think you want to look at the Rcpp package. I've not used it myself but it seems to address your interface issue.
No, it doesn't. C++ != C# (they're not even close; C# is closer to Java).
As for 'multi-threading' I think in a very specific way you might look at the foreach package and then the multi-processing packages like doMC and doParallel. I'm using doMC & doParallel on Linux and have as many as 12 identical processes (parameter exploration ala the quantstratIII demo) running at the same time. If you need more than the number of cores on your machine then I think you want ReDis but I've never used it. There's web pages out there talking about it though. HTH, Mark
-- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com