TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Do You Prefer REST or RPC Style APIs?

6 pointsby gauravphoenixover 5 years ago
Personally I prefer to expose REST APIs for the external (Internet) facing services for simplicity. For internal APIs I prefer gRPC for performance reasons. The real question is that if there are no technical limitations (HTTP 1.1 vs 2 etc, bi-directional and communication etc), which style of API would you prefer and why?

3 comments

brilloutover 5 years ago
For internal APIs I&#x27;d recommend RPC and REST&#x2F;GraphQL to create an API consumed by third parties.<p>Wildcard&#x27;s readme elaborates more on RPC vs REST: <a href="https:&#x2F;&#x2F;github.com&#x2F;reframejs&#x2F;wildcard-api" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;reframejs&#x2F;wildcard-api</a><p>(Wildcard is RPC implementation for Node.js and the browser.)
derricgillingover 5 years ago
I prefer REST especially for public&#x2F;external APIs. It&#x27;s more empathetic towards third party developers who may not be as intimate with your API as your internal team. For example, much easier to reason a few well-understood entities like items, users, and orders if I was building an e-commerce API then a list of RPC operations. I would add GraphQL can also be easier to understand as long as the entity relations make sense. Lot&#x27;s of exciting stuff happening in the GraphQL world but it does have disadvantages also.
em10fanover 5 years ago
That depends, do you consider SOAP to fall into the latter category?<p>If so, no.