views:

99

answers:

2

Is there any clear definition about RPC and Web Service? A quick wikipedia search shows:

RPC: Remote procedure call (RPC) is an Inter-process communication technology that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction.

Web Service: Web services are typically application programming interfaces (API) or web APIs that are accessed via Hypertext Transfer Protocol and executed on a remote system hosting the requested services. Web services tend to fall into one of two camps: Big Web Services[1] and RESTful Web Services.

I am not quite clear what the real difference between the two things. It seems that one thing could belongs to RPC and is kind of web service at the same time.

Is Web Service a higher level representation of RPC?

A: 

These are different ways to do interprocess function calls and object oriented interfaces. They have minor high level (ideological) differences and on low level they are completely different.

On low level, these work completely differently. XML web service uses XML over http, meaning there's a web server and other heavy machinery involved. It uses very standard protocols.

RPC is more lightweight, windows native, typically used between windows programs. Uses undocumented transport layers (hence, they might change without notice). It is expected to be faster.

Pavel Radzivilovsky
RPC is not a Windows specific technology. Java EJBs, for example, use RPC to communicate with one another.
Wayne Hartman
+2  A: 

Is Web Service a higher level representation of RPC?

Yes, it is. A web service is a specific implementation of RPC. At its lowest level, all a web service is, is connecting to a socket, using the HTTP protocol to negotiate sending a payload that is executed in a remote space (it may even be on the same computer, for all the consumer knows). All those abstractions are at its core RPC.

Wayne Hartman
Further attributes of a Web Service in addition to what Wayne wrote: allows a platform independent way of a RPC, is discoverable and self describing (compare that with a Win32 RPC).
Alex