Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the most lightweight way to have two .net apps talk to each other?

Tags:

.net

ipc

We have a .net service with simple commands (play, pause, next track, for example). This is installed on users' workstation's with its own credentials (FooServiceUser, for example). If I want to give the users an app that can send the commands to the service, what would be the most lightweight way to do so? Remember I only want to send commands from a single workstation to a process running on that same workstation. The commands are very simple. Also the app needs to receive status from the service. ie paused, playing track 21.

Should be easy right? WCF looks complicated and overkill. Everyone on SO is saying .net remoting is bad. I don't want to install MSMQ. Every mention of sockets gets a negative score.

like image 725
Ben L Avatar asked Dec 12 '10 20:12

Ben L


1 Answers

For a complete, easy to use solution I would recommend WCF. It supports a memory-channel protocol (ICP) for just this application.

Remains what you would call 'light-weight'. The hosting part of WCF can be accomplished in about 5 lines of code. All client-side code is generated. So do you really care about the number and size of the assemblies you have to use (already installed) or the amount of features you're going to ignore?

Just use WCF.
And it will let you easily scale out to sockets and inter-PC if the need ever arises.

like image 118
Henk Holterman Avatar answered Sep 28 '22 14:09

Henk Holterman