RPC and Distributed Systems fundamentals for Billionaires — A quick guide to never be bullied again

Debmalya Sinha
4 min readNov 16, 2022

Are your employees bullying you on a platform you own? Do you have a nagging feeling that some peasants are laughing behind your back? Has CryptoGod69 on twitter said you’re humanity’s last savior but a random software engineer said your’e a fraud? Look no further. This is a handy guide to never let those ants talk smack again.

RPC — what is it and how do we make money out of this?

RPC: Remote Procedure Calls.
Procedure: is a block of code that does a specific task in a computer program. Imagine your “morning routine” as a procedure where you brush, pee, take shower, dress up, open Instagram (only me? everyone’s using tiktok? ok then) on your phone.
Remote Procedure: is a procedure (P1) that called by a program (E1) running in a computer (C1).
Remote Procedure Calls: are a way to ask the procedure P1 to be executed within the program (E1) running in a computer (C1) from another program (E2).

Now what’s this “remote” part?

Because the caller of the remote procedure (P1) in program (E1) is another program (E2). Now E2 can run in the same computer C1 or at a different computer C2. In the later case, we’ll send the RPC request via a network (ether/internet).
Example: when your “morning routine” is being executed by you, the it’s the native procedure. When your partner who lives in the same house shouts you to execute the routine, then it’s RPC but on the same computer C1. If your partner is at a different house and Whataapps you: “good morning babe, don’t forget to do your morning routine”, then it is also an RPC but executed from a different computer and the RPC call was sent through a network.

“Apps don’t make RPCs” — Famous last words of a snarky SWE!

Yes I know, how dare they! Technically, Apps (short for application. probably coined by SteveJobs™. PBUH.) are programs so they can indeed make RPCs, as we discussed above. Hoep they get fired on the very platform they worked hard to build.

But, slow down. Deep breath. The snarky puppy above is also not wrong. Apps dont usually make RPCs.
So how do they get the data?
By sending “requests!”
Take Twitter, the recently overhauled free speech platform. In Twitter’s case, they are REST requests ( outside scope of current article) that tells a server, “Hey, kinda need some data. gib data pls.”

Now why do Billionaires like you hear stuff like 1200 RPC calls (sic) in a single UI operation if there’s almost no RPC from an App and only REST requests?

Because that 1200 call rumour, it’s true. Only the RPC (note: saying RPC “calls” is dumb. RPC already means remoteprocedure “calls”) are made mostly entirely on the server-side. For capable distributed systems like Twitter Infra, 1200 RPC calls is a child’s play for their servers to execute.

Now if the SWE was right, and your head honchos who gave you the buzzwords and cool numbers are also kinda right about twitter being slow in some countries, what is slowing Twitter down?

There can be a number of reasons why a service is slow (none of it is your fault)

  1. Cache : is a method where we fetch the popular data before there is demand for it. Example: like the stores put the Halloween candies upfront during the season so people don’t have to walk all the way over aisle 420. Twitter cache handling might be lagging in certain countries. (again for a number of reason out of scope of this article)
  2. Edge geo-pinning: is a way you can distribute certain databases and replicate them at certain geographic regions. If something disrupts these edges (DB services), then the tail latencies could be substantial. Example, Imagine you order Pizza from Dominos website but the Dominos shop near your house is closed for some reason so the website had to order one from 50 miles away. Rest assured, you’ll not be getting your pizza in 30 minutes or less!
  3. Simple network bandwidth throttling: in certain countires where the internet backbone network isn’t efficient/capable, they can prioritise data in/out. Example, at a hospital A&E (emergency for everyone), if you went there with a sniffle, you’ll be deprioritised for the fine gentleman with a gunshot wound. Unfair? Life isn’t fair mate.

So what do we (you) do with this mostly useless information about Distributed system?

You are a Billionaire, right? If yes, “what colour is your Bugatti™?”
But seriously though, stop spitting clever sounding buzzwords for clout just to appear intelligent and in-control of the situation. You can instead read up on how stuff works and maybe consult a few people who works for you to actually understand systems? Just tell them : “ELI5” They’ll understand.

fig 1: iron man. Origin story of the poor son of an emerald mining Multi Millionaire

Most Billionaires can be the Genius, Playboy, Philanthropist IronMan we already think they are. You can become one too. Just ask the right questions to right people. Or just buy a social media company. Your money, your narrative. Problem solved.

Good luck out there with snarky Engineers. Better yet, fire ’em all. Who needs them anyway, right?

fig 2: The Mad King from A Game of Thrones. A historic Romantic Comedy.

--

--

Debmalya Sinha

Engineer at Facebook. RnD with AR, Rendering, LightFields, ML