tags:

views:

379

answers:

2

What's the easiest way to get RPC in .NET? I see that there is .NET Remoting and WCF, and according to Wikipedia, WCF is the successor to .NET Remoting.

So far, I only tried the remoting stuff, which seems to be pretty simple -- I also didn't hit any problem with the application speed so far. Is .NET remoting really the best way to get RPC working, or should I look into WCF (as .NET remoting is going to be discontinued in favor of it?)? I only want communication with already known objects written in C#, so I don't need any of this XML/SOAP/etc. transport format stuff. The target application is meant to be distributed over a network, and communicate only with instances of itself. In this context, I simply want to connect to an object somewhere, without having to deal with protocol level issues.

+2  A: 

You can use WCF with binary formatting and TCP binding. If that (still) isn't fast enough you will have to look at custom (non standard) technologies. For communication on 1 machine you can use the IPC protocol (which is similar to or based on named pipes).

And indeed, Remoting is disappearing as a separate technique. It is being assimilated by WCF.

Henk Holterman
Named pipes are even quicker, though they're only options when the processes are on the same machine. (WPF has bindings for named pipes too.)
Noldorin
I assumed it was to another computer, for local RPC WCF supports the IPC protocol which should offer the same speed as named pipes.
Henk Holterman
+2  A: 

Once I've read a discussion somewhere, on CP I think, and someone was proving that WCF using pipes (which enables you to go IPC on the same machine only) is much faster then .Net Remoting, and when using tcp - it's a bit faster. I can't confirm it's true for all cases, but you can google for some benchmarks, I've seen few. In my opionion, if remoting gives you everything that you need, you can stick with it, at least for now :).

Ravadre