Which is fastest interprocess communication(WM_COPYDATA vs Winsock vs .NET Remoting)

Which is fastest interprocess communication and easy to implement (WM_COPYDATA vs Winsock vs .NET Remoting)
*I tried researching on Enterprise Services but there are very limited resources and samples to look at.

it will be implemented in the same machine(using Vista) as of now
but has a chance to transfer it to different machines in the future.
For Winsock, i think it is same as using TCPListener/tcpclient(correct me if i am wrong)
so maybe this is more easier and it is managed code
LVL 1
danaceAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

drichardsCommented:
I'd look at named pipes if you are using  latest .NET (http://msdn.microsoft.com/en-us/library/system.io.pipes.aspx and http://msdn.microsoft.com/en-us/library/bb762927.aspx).  Faster than TCP on same machine and named pipes can also be used across machines.

If you use WCF you can configure which transport is used (HTTP, TCP, named pipes).
0
danaceAuthor Commented:
Thanks for the comment but when pipes is used across machines, the performance might suffer based on what i have read(http://msdn.microsoft.com/en-us/library/ms187892.aspx). That is why I didn't included pipes as my choice. As of now I am trying to find something that perfoms best either in the same or across machines.

I think implementing WCF may take time in implementing because i need to study it from scratch..
is there other recommendations?
0
drichardsCommented:
Since I don't know anything about your app, I cannot recommend what would be best.  I can only say that pipes are much better between local processes, which is your first target.  They are also not bad on a decent network with reasonable data volumes.  They are not best for high-volume server apps.

WCF, while it does have a learning curve, is also very powerful if your app needs the flexibility.

Otherwise, TCP is a solid choice and reasonably straightforward to implement.
0
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

drichardsCommented:
Even the MS article you refernce concedes that:

"Generally, TCP/IP is preferred in a slow LAN, WAN, or dial-up network, whereas named pipes can be a better choice when network speed is not the issue, as it offers more functionality, ease of use, and configuration options."

That does not sound like a compelling argument to avoid pipes just because a network is involved.

But again, you know the requirements of your app and I do not.  I just now I have used pipes quite successfully.  I have also used TCP and even UDP quite successfully, and the right choice does depend on the exact nature of the application.
0
danaceAuthor Commented:
I am developing a multithreaded client-server application(running Vista) which communicates via HTTP Request using HTTPListener/HTTPWebRequest. The server(which is the focus of my question) will be having different modules. I want these modules to communicate with each other using the fastest IPC but I can't figure out which of them are best in terms of speed. These modules reside in the same machine and be in different machines in the future.

I am really confused between those IPC mechanisms, and don't know which would be the best for me to use. Is named pipes still your recommendation for my application? How about remoting?
0
drichardsCommented:
I think you're probably needlessly confused.  You can probably use any of:

1) Named Pipes
2) TCP
3) TCP remoting
4) WCF configured for named pipes within the machine and TCP for remote operation

with success.  I'd start with the one you are most confortable with and check performance.  Remotring and WCF are only options if you are communicating via .NET objects.  If you've got some custom protocol that you want or need to use then you've got to do that yourself over a pipe or socket.
0
danaceAuthor Commented:
Thanks for the help, i will try to check out on these named pipes first.
But still not so satisfied with the solution though..I also found out about the Named pipe version .Net Remoting using Channel.Ipc...have any idea on it?
0
drichardsCommented:
Remoting Channel.IPC works as well.  If you're going to do remoting, though, I think it's worth learning WCF.  Might as well go with the most current thing in that case.

What else do you think you are looking for?  If you want the fastest commuincation, pipes are best on-box and TCP is probably best off-box, esppecially since that's what the remoting supports.  Remote pipes must be done using base IO.Pipes.

TCP is a decent compromise if you don't want the extra step of configuring the remoting.

We've got an app that uses TCP/binary remoting both on and off box and we haven't had performance issues to make us change.  It's to attach a web server to some back-end services running as Windows services.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
danaceAuthor Commented:
Ok thank you for the suggestion regarding WCF.I may consider it.

Overall, thanks for the answers. It is very well explained.
0
danaceAuthor Commented:
Very Nice! Thanks for the help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.