Urgent.News

What's breaking now, across thousands of outlets.

Tech

A Remote Function Call Will Never Really Be Local: Rethinking Distributed Computing #4

The API can hide the distance. It cannot erase what the distance changes. "Explore the CAP theorem through practical examples of replication, network partitions, split brain, quorum, consistency, and availability and learn what distributed systems sacrifice when communication fails." Suppose a client needs some work done by another component. On one machine, this is boring in the best possible…

The promise of Remote Procedure Call (RPC) is to allow a client to call a procedure on another machine as if it were calling a local procedure. However, RPC has its limitations and cannot truly erase the distance between the client and server. The network does not understand functions; it understands messages and bytes. RPC must transform the procedure call into communication, which involves several steps.

First, the application code calls a client stub, which builds a message and passes it to the communication middleware. The message crosses the network, and upon reaching the server, the middleware passes it to a server stub or skeleton. The server stub reconstructs the arguments and calls the real local implementation. Finally, the result is sent back through the reverse process.

RPC relies on agreed-upon representations for parameters and results, as different machines may have different byte orders, encoding rules, floating-point representations, and memory layouts. This means that the data most definitely knows it has traveled, and the illusion of a local call begins to fall apart.

In addition, remote invocation requires binding, where the client must discover and connect to the service implementing the desired interface. This is where location transparency comes into play, but the underlying machinery still exists. Local calls have a comfortable timeline, with the client waiting for the procedure to return before continuing. RPC can reproduce this model, but other interaction patterns become useful, such as sending a message and waiting for a response without waiting for a direct return.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

“Send” Is Not One Operation: Rethinking Distributed Computing #5

The dangerous part of send(message) is how much meaning we quietly pack into the word “send.” "Why send(message) is not one operation. Explore transient vs. persistent communication, synchronous vs.

  • Send verb hides multiple decisions in distributed computing
  • Two key questions: message lifespan and sender's wait time
  • Message queue decouples applications, enabling independent operation

38 Dart & Flutter Tips That Actually Make a Difference in Production

After 4+ years of building Flutter applications, I’ve learned that the biggest improvements often come from small decisions repeated every day. A better way to handle a nullable value.

  • Consistent small decisions lead to significant improvements in Flutter apps
  • Better handling of nullable values enhances code reliability
  • Organizing business logic effectively streamlines app development

More from Saturday 26 September →