IPC Mechanisms in C# - Usage and Best Practices


I have used IPC in win32 code a while ago. [Critical sections, events & semaphores]

How is the scene in .NET enviroment? Are there any tutorial explaining all available options and when to use and why?

9/11/2008 9:24:22 AM

Accepted Answer

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:

and of course MSDN on WCF

9/11/2008 9:43:06 AM

Apart from the obvious (WCF), there is a ZeroMQ binding for C#/CLR which is pretty good:


Does message-oriented IPC, pub/sub and various other strategies with much less code and config than WCF.

It's also at least an order of magnitude faster than anything else and has less latency if you require low latency comms.

With respects to semaphores, locks, mutexes etc. If you share by communicating rather than communicate by sharing, you'll have a whole load less hassle than the traditional paradigm.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow