[R-SIG-Finance] Talking to C# API (Any reference to learn the same)

Suresh Nageswaran sureshnageswaran at yahoo.com
Sun Oct 12 23:07:40 CEST 2014


Kunal -

Your basic problem is around options for high performance inter-process communications. Since you mention C#, I'm going to assume your target applications are all running on Windows.

So you have several options under Windows including shared memory, pipes, queues, DMA etc.

>From what I've seen, named pipes are the fastest way to do any kind of IPC on Windows. On a single core, individual pipe data xfer can take less than 4 ms. On multiple cores, this can degrade to 25ms, but still  far faster than your 333 ms (1000 ms / 3) requirement.

Start with figuring out how to make DLL calls within R. Then configure your R programs as Named Pipe clients i.e. get them to make those calls. 


Named Pipes (Windows)

  
          
Named Pipes (Windows)
A named pipe is a named, one-way or duplex pipe for communication between the pipe server and one or more pipe clients.   
View on msdn.microsoft.com Preview by Yahoo  
  
 
Hope this helps.

Cheers
Suresh


>________________________________
> From: Kunal Shah <kunalshah305 at gmail.com>
>To: r-sig-finance at r-project.org 
>Sent: Saturday, October 11, 2014 11:13 AM
>Subject: [R-SIG-Finance] Talking to C# API (Any reference to learn the same)
> 
>
>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?
>
>
>Regards
>
>    [[alternative HTML version deleted]]
>
>_______________________________________________
>R-SIG-Finance at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>-- Subscriber-posting only. If you want to post, subscribe first.
>-- Also note that this is not the r-help list where general R questions should go.
>
>
>
	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list