From what I understand about RPC (Remote Procedure Calls), is that they provide a way to send function calls, invocations, etc to remote machines. The obvious advantage of this is that you can have a single program that runs on a cluster of machines and can handle more requests, more data, on so on.
But I'm puzzled by LRPC - Lightweight RPC. Apparently this stuff exists to speed up RPC on the same machine. As written in the paper I linked to:
Lightweight Remote Procedure Call (LRPC) is a communication facility designed and optimized for communication between protection domains on the same machine. In contemporary small-kernel operating systems, existing RPC systems incur an unnecessarily high cost when used for the type of communication that predominates-between protection domains on the same machine. This cost leads system designers to coalesce weakly related subsystems into the same protection domain, trading safety for performance. By reducing the overhead of same-machine communication, LRPC encourages both safety and performance.
My question is: what is the point of RPC if you're running everything o nthe same computer. The R stands for REMOTE. If you're not gonna be Remote, then just call it LPC. What am I missing?
Lightweight Remote Procedure Call (LRPC) is a communication facility designed and optimized for communication between protection domains on the same machine.
The major benefits of RPC are twofold: the programmer can now use procedure call semantics and writing distributed applications is simplified because RPC hides all of the network code into stub functions. Also, application programs don't have to worry about details (such as sockets, port numbers, byte ordering).
Lightweight RPC is a communication facility that is designed and optimized for communication between protected domains in the same machine. LRPC Simplify aspects of RPC such as control transfer, data transfer, linkage, and stubs.
ADVANTAGES : RPC provides ABSTRACTION i.e message-passing nature of network communication is hidden from the user. RPC often omits many of the protocol layers to improve performance. Even a small performance improvement is important because a program may invoke RPCs often.
There are several use cases for local RPC, but a very straightforward example is when a server has both remote and local clients.
Let us consider for example an RPC-based print server:
Obviously, you don't want to write both an print-server for remote clients and a separate print-server for local clients. Thus, it is far better if the architecture or middleware allows for designing a print server that can be used indifferently by remote clients (remote RPC) and local clients (local RPC).
At this point, the architecture or middleware ensures a common interface both for local clients and for remote clients: how inter-process communication is achieved in practice must be made fully transparent to the application developer.
However, using the same inter-process communication technology both for remote clients and for local clients may be inefficient. Thus, it is fairly common for the RPC architecture to implement some kind of optimization so as to optimize performance when the server and the client are located on the same host. In spirit, this optimization is very similar to the fact that local network communication use the local loop rather than going back and forth between the host and the network card.
Lightweight RPC is one such solution (it is not the only one) allowing for optimizing RPC performance for local clients. When this optimization is implemented into the RPC architecture:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With