Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What is the difference between RPC and API besides the URL & payload structure?


It's just semantics. "managing remote resources" or "calling remote procedures" is all just network calls, usually http.


Semantics are 90% of programming though. Learning syntax is simple, learning semantics is hard. Semantics structure how you think about problems and express solutions.


That's rather handwavy.

The question is about a performance benchmark. From a performance standpoint, rpc and rest are the same (http requests that execute code on the server).

The "semantics" you assign to one or the other don't change the technical details about implementation and performance.


But in this case there is almost no difference. Basically same payloads with a slightly different "command" format.


It's the same payloads with a slightly different command format if you structure your program in exactly the same way. The point is that you don't structure your program in exactly the same way in each case.


Semantics is 90% of life!


> it's all just data

> it's all just computers

> we're all just going to die anyway


REST is based around resources and kind of the polar opposite of RPC when it comes to writing APIs.


REST is literally RPC. You are making a remote procedure call to a URL. GET this resource. DELETE this resource. It's the same thing.

What is the difference between remote.perform('some-action', { payload }) and remote.POST('some-action', payload) ?


There is no difference: neither of those are REST.

Calling an URL with an action in the path name (rather than a resource name) is technically not done in REST -- the action is expressed through your HTTP verb.

Using GET/POST/DELETE directly does not mean you're doing REST - there's a whole set of rules and assumptions that come with it.


Is it though? Or is the difference mostly semantics? At then end of the day it's just barely different ways for issuing a "command".




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: