Categories
.net c# ipc process

What is the best choice for .NET inter-process communication? [closed]

84

Should I use Named Pipes, or .NET Remoting to communicate with a running process on my machine?

1

57

WCF is the best choice. It supports a number of different transport mechanisms (including Named Pipes) and can be completely configuration driven. I would highly recommend that you take a look at WCF.

Here is a blog that does a WCF vs Remoting performance comparison.

A quote from the blog:

The WCF and .NET Remoting are really comparable in performance. The differences are so small (measuring client latency) that it does not matter which one is a bit faster. WCF though has much better server throughput than .NET Remoting. If I would start completely new project I would chose the WCF. Anyway the WCF does much more than Remoting and for all those features I love it.

MSDN Section for WCF

1

  • 1

    Further evidence in favour of remoting. From someone on the Microsoft remoting/WCF team: “there is very minimal development investment going into Remoting. WCF is the successor of Remoting.” From here stackoverflow.com/questions/1294494/…

    – MarkJ

    Aug 27, 2009 at 12:31

15

If it’s on a single machine, Named Pipes gives you better performance and can be implemented with the remoting infrastructure as well as WCF. Or you can just directly use System.IO.Pipes.

    5

    If you mean inter-process communication, I used .NET Remoting without any problem so far. If the two processes are on the same machine, the communication is quite fast.

    Named Pipes are definitely more efficient, but they require the design of at least a basic application protocol, which might not be feasible. Remoting allows you to invoke remote methods with ease .

    1

    • 4

      WCF over named pipes allows this too. And you can just use the same contracts assembly in both processes.

      Sep 17, 2008 at 17:42