tags:

views:

92

answers:

5

If my applications run on a same computer or even on different computers in a same LAN and need intense and quick communication, it seems illogical for me to use text-encoded web services and HTTP. I could possibly use IP/TCP/UDP sockets and invent my own protocols, but believe there is a standard way for .Net applications to send/receive object instances (and, maybe, even sharing an object by reference?). Can you tell me what's that standard way? I am only interested in .Net Framework 4 applications and don't need to support legacy frameworks.

+1  A: 

Probably either WCF over NetTcp or NetNamedPipe bindings, or else .NET Remoting.

Brian
+6  A: 

You'll want to use Windows Communication Foundation:
http://msdn.microsoft.com/en-us/magazine/cc163647.aspx

Another link on getting started with WCF

Microsoft has chosen this as their preferred method of communication for .net apps. It replaces Remoting and Web Services.

The great thing about it is that you can switch to different protocols with a small amount of work, so if one protocol doesn't work for you, you can change around the configuration to try another one.

Kevin
While I agree this is a valid solution, WCF = craploads of code to do the simplest stuff, and configuration is a nightmare.
jvenema
@jvenema I agree there is some setup involved, but once you get it up and running, there are huge advantages over the previous alternatives.
Kevin
@jvenema - this is true prior to .NET 4.0. With .NET 4.0 they have greatly simplified the configuration requirements by providing defaults for many things.
Zach Bonham
Good to know re: improvements in .NET 4.0; I guess I'll go back and take another look.
jvenema
A: 

I you want to share objects, then .NET Remoting is probably a good way to achieve that.

Sebastian P.R. Gingter
A: 

In a word: remoting

http://msdn.microsoft.com/en-us/library/kwdt6w2k(VS.71).aspx

If performance is still an issue, TCP (or even UDP depending on requirements) is still your friend.

jvenema
Remoting is considered an obsolete technology, remoting performance can be achieved using WCF if proper configuration is used.http://msdn.microsoft.com/en-us/library/system.servicemodel.netnamedpipebinding.aspx
Keivan
+1  A: 

.Net 4 gives you the Memory-mapped File which you may back with the paging file and share between applications by name.

Jesse C. Slicer
Very interesting. Thanks.
Ivan