Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inter-Process communication options

I need to subscribe inside one app for the event exposed by another app. I noticed that many people consider the using of WCF Named Pipes as the best practice. Am I right that if I choose WCF Named Pipes I'll have to use IIS?

And by the way, what options do I have in general?

like image 301
EngineerSpock Avatar asked Aug 26 '13 05:08

EngineerSpock


2 Answers

Named pipes are one of the fastest way to do IPC (inter-process communication) on the same machine. The have existed for a long while (was NT4 the first OS?) and not specific for WCF.

I would however not use WCF/Named pipes through ASP.NET as IIS do not use named pipes for it's communication. that means that your app will close if IIS have not received HTTP requests for a while.

How you should host your IPC depends on the type of application. If you want to always have your server running you should host it in a windows service. Otherwise you could just include it in your desktop app.

You do not necessarily have to use WCF, you can use named pipes directly (look at the link in the beginning of my message). It all depends on how complex your communication is.

like image 82
jgauffin Avatar answered Oct 06 '22 15:10

jgauffin


Am I right that if I choose WCF Named Pipes I'll have to use IIS And by the way, what options do I have in general?

No, not really. Although this is an option but you have other options as well. Like,

  • Self-Hosting Your Service
  • Hosting in Windows Services
  • Hosting Using Internet Information Services (IIS)

    which you can read in detail here.

Named pipes existed even before WCF and WCF is certainly not the only way to use them

like image 26
Ehsan Avatar answered Oct 06 '22 13:10

Ehsan