What Is the Best Choice For .Net Inter-Process Communication

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

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

What's the best technology for passing a stop argument to a service from a .NET-Application by Inter-process Communication?

According to @MatSnow 's comment under the original question the Service Controller might be the best choice for this problem.

ServiceController Class Stop Method

Best way for interprocess communication in two ways between a server and a client

If you don't know anything about communication, pick an off the shelf solution. A Bidirectional WCF channel is a good example. See What You Need To Know About One-Way Calls, Callbacks, And Events for a primer. Read WCF Overview (including all the links!) for an introduction into WCF.

If you are more versed into communications then you should had defined the problem more clearly:

  • what authentication model is used? Kerberos, certificates, password, none?
  • intranet or internet?
  • who's doing the listenning? your own service, http.sys, WCF activation?
  • and the most fundamental question: syncronous or asynchronous? And I do not mean asyn as an async API, but async as in queued message oriented protocol.

IPC Mechanisms in C# - Usage and Best Practices

Most recent Microsoft's stuff in IPC is Windows Communication Foundation. Actually there is nothing new in the lower level (tcp, upd, named pipes etc) But WCF simplifies IPC development greatly.

Useful resource:

  • Interprocess Communication with WCF on Dr. Dobb's portal
  • WCF Communication Options in the .NET Framework 3.5

and of course MSDN on WCF



Related Topics



Leave a reply



Submit