I have used IPC in Win32 code a while ago - critical sections, events, and semaphores.
How is the scene in the .NET environment? Are there any tutorial explaining all available options and when to use and why?
Inter-process communication (IPC) is a mechanism that allows processes to communicate with each other and synchronize their actions. The communication between these processes can be seen as a method of co-operation between them. Processes can communicate with each other through both: Shared Memory. Message passing.
Different ways of IPC are pipe, message passing, message queue, shared memory, direct communication, indirect communication and FIFO.
1 System V IPC Mechanisms. Linux supports three types of interprocess communication mechanisms that first appeared in Unix TM System V (1983). These are message queues, semaphores and shared memory. These System V IPC mechanisms all share common authentication methods.
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
Apart from the obvious (WCF), there is a ZeroMQ binding for C#/CLR which is pretty good:
http://www.zeromq.org/bindings:clr
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With