Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use Web Services instead of RPC between two internal processes?

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!

like image 238
Jesse Pepper Avatar asked Jan 03 '09 10:01

Jesse Pepper


People also ask

What is the difference between RPC and Web services?

RPC allows for the processing of multiple threads that share a given address. RPC employed on a platform that uses EJB. Web Service used in non-Java platforms when an app wants access. Web Service also is used for synchronization of asynchronous communication.

Do Web Services supports remote procedure calls?

XML-RPC is among the simplest and most foolproof web service approaches that makes it easy for computers to call procedures on other computers. XML-RPC permits programs to make function or procedure calls across a network. XML-RPC uses the HTTP protocol to pass information from a client computer to a server computer.

What are two main issues of RPC?

While the RPC concept is simple, there are two main problems that make it more complicated than local procedure calls: The network between the calling process and the called process has much more complex properties than the backplane of a computer.

Why do we use Web services?

Web services allow different organizations or applications from multiple sources to communicate without the need to share sensitive data or IT infrastructure. Instead, all information is shared through a programmatic interface across a network.


2 Answers

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++)...

like image 95
Edouard A. Avatar answered Nov 04 '22 06:11

Edouard 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.

like image 26
OJ. Avatar answered Nov 04 '22 07:11

OJ.