HTTP vs RemoteProcedureCalls

201 views Asked by At

I have a quick question about RPC vs HTTP.

I have figured out, that the main difference between RPC and HTTP is, that you call a function on a Server (RPC) and that HTTP is for exchanging Data.

But they are quite similar right? When you Post something or Get something (HTTP), the server is also just doing functionality with the data you did send to it.

I have read, that HTTP uses TCP and RPC UDP. Can someone explain that to me? Why does HTTP need TCP? The difference between TCP and UDP is clear to me, but why do they both use different technologies, when they are actually doing the same thing?

So where is the difference between them?

1

There are 1 answers

2
Steffen Ullrich On BEST ANSWER

RPC just means Remote Procedure Call, i.e. invoking some functionality offered by a remote "thing" (process, computer, ...) and maybe getting a result back. It does not mean a specific technology how these RPC are done.

There is actually a variety of technologies to do this, see Wikipedia: RPC for more. Some of these technologies use HTTP as the underlying layer. Some use UDP, most probably use TCP though.

So basically you are comparing "food delivery" (RPC) with "car" (HTTP), i.e. food can be delivered using cars but not all cars deliver foods and not all food delivery is done by car.