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.

Writing an RPC from Scratch (2021)

81 pointsby otrasabout 2 years ago

4 comments

eskaabout 2 years ago
This looks more like a socket tutorial than rpc. It leaves out most aspects about implementing rpc that are actually interesting.
评论 #35786649 未加载
JonChesterfieldabout 2 years ago
Ignores failure modes. The is_prime example takes an integer to a bool, and is put on the far side of a network call, but there&#x27;s no change to the interface to indicate network failures and no fallback path to compute it locally if things go wrong.<p>(strictly it calls exit on anything going wrong, but as the whole problem with rpc is the extra failure modes that&#x27;s not compelling)
评论 #35785602 未加载
评论 #35784553 未加载
评论 #35785175 未加载
butterisgoodabout 2 years ago
The whole “network order” of bytes thing is not a given. There’s little endian “network orderings”.<p>And now it seems most CPUs are little endian anyway, so why do this conversion anymore to “network order” if you are designing a new protocol?
评论 #35785754 未加载
segfaltnhabout 2 years ago
Great intro for more junior devs learning how it all comes together. It&#x27;s incredibly easy to use these things without understanding what they are doing for you under the hood.