2

I have an abstract factory which will initiate separate processes (.NET EXE's) on demand. The abstract factory needs to initiate processes at any time and let the newly created processes be able to communicate with processes in which the abstract factory reside. This interprocess communication is going to be done at the factory that created them. These will be background processes (no GUI involved). What's the possible solution to this problem?

.NET remoting or PIPES both make the processes able to communicate after they have been initiated, but first they need to be initiated on demand and they'll execute separate standalone processes (They will be shown in task manager as well as standing process) and then after that, the interprocess communication will take place.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Usman
  • 2,742
  • 4
  • 44
  • 82

1 Answers1

0

Look at the System.IO.Pipes Namespace.

Anonymous pipes are designed for parent-child interprocess communication.

There are examples provided if you follow the link.

You can also use the named Mutex Class for synchronization and the Process Class for starting child processes.

Jaroslav Jandek
  • 9,463
  • 1
  • 28
  • 30
  • Pipes always make inter process communication possible AFTER processes instantiated. Process then communicates using pipes. This can be done via WCF and .NET remoting as well both have pros and cons. My problem is'nt this. I need to create background processes on demand and they will run as seperate processes and then they will communicate using .NET remoting or via pipes or WCF. First they need to be creat as seperate process via some factory method – Usman Jul 05 '10 at 17:10
  • Thanks Jaroslav.. I am able to create seperate processes and now will make communication using .NET remoting. – Usman Jul 05 '10 at 17:18