views:

304

answers:

4

Can anyone suggest a good reason to use web services instead of RPC (not xml-rpc) as a comms channel between two C++ processes both of which will be developed by the same team? Note: Web services do not guarantee ordered delivery!

A: 

I usually look at which technology offers more documentation and support on the web. You might want to also consider what protocol other systems might use down the track.

Sir Psycho
I can't think of a reason why Web Services is better, which is why I asked the question. Lots of other people try to tell me they are a good thing, but none of the reasons for them being better really apply to an internal interface like this. So I'm not really asking how to choose between the two.
Jesse Pepper
This doesn't answer the question at all.
OJ
+4  A: 

Web services are great when you need:

  • Support for many languages and platforms
  • SOA based applications
  • Distributed services

If you dont need any of these, or never will, then there's nothing wrong with RPC at all. If your application's processes all live on the same machine and you need to communicate between them, RPC is a perfectly acceptable solution.

OJ
I'm not necessarily talking about on the same physical machine here, but I agree with you nonetheless.
Jesse Pepper
That's cool, the point still stands :)
OJ
+8  A: 

When people have a hammer, they tend to see all problems as nails. That's why people tend to put webservices everywhere as if it were the only way for two processes to communicate.

In your case RPC seems to be a better choice, more performance, less memory usage, simpler to implement (in C++)...

Edouard A.
+1  A: 

If you don't need to do anything beyond what local RPC can handle and are confident that you never will, then there's no reason not to use it.

Dave Sherohman