IPC Mechanisms in C # - Use and Best Practices

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

What is the scene in the .NET environment? Is there any tutorial explaining all the options available and when to use and why?

+50
c # ipc
Sep 11 '08 at 9:24
source share
6 answers

The latest Microsoft stuff at IPC: Windows Communication Foundation . Actually at the lower level there is nothing new (tcp, upd, named pipes, etc.). However, WCF greatly simplifies the development of IPC.

Useful resource:

and of course MSDN in WCF

+28
Sep 11 '08 at 9:34
source share

I tend to use named pipes or Unix sockets (depending on whether I am configured on MS.NET or Mono - I have a class that abstracts it), because it is easy to use, portable and allows me to easily interact with unmanaged code . However, if you are dealing only with managed code, go to WCF or delete - the latter if you need Mono support, because their WCF support just doesn't exist yet.

+10
Sep 11 '08 at 10:00
source share

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

http://www.zeromq.org/bindings:clr

Are there message-oriented IPCs, pub / sub, and various other strategies with much less code and configuration than WCF.

It is also at least an order of magnitude faster than anything else and has less latency if you need a low latency connection.

Regarding semaphores, locks, mutexes, etc. If you are sharing messages and not sharing, you will have less workload than the traditional paradigm.

+10
Sep 27 '11 at 16:36
source share

I would recommend using memory files if you need to use machines in the domain, and not over the network. See the following link.

http://techmikael.blogspot.com/2010/02/blazing-fast-ipc-in-net-4-wcf-vs.html

+6
Jan 03 2018-12-01T00:
source share

There is also .NET Remoting, which I found pretty cool, but I think they are now reinstalling it since they have WCF.

+3
Sep 11 '08 at 9:38
source share

It sounds as if you are interested in synchronization methods, not communication. If so, you can start here , or perhaps this is a more brief overview .

+3
Sep 11 '08 at 10:40
source share



All Articles