Grokking the System Design Interview
Vote

0% completed

REST vs RPC

You are splitting one application into services. The order service must now call the catalog service across the network. Every call needs a shape. Should the API name things, or should it name actions?

That is the REST against RPC decision. In REST, you name things. GET /articles/42 asks for one article, and the HTTP method says what to do with it. In RPC, you name actions. getArticle(42) calls a function that runs on another machine.

This naming difference decides everything else about the two styles

.....

.....

.....

Like the course? Get enrolled and start learning!
Tiit Kuuskmäe

Tiit Kuuskmäe

· a year ago

REST protocal can also transfer XML, thus the data formatting is not a difference of the two.