Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical gRPC

You're reading from   Practical gRPC Build highly-connected systems with a framework that can run on any platform

Arrow left icon
Product type Paperback
Published in Nov 2019
Publisher
ISBN-13 9781839211744
Length 169 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (6):
Arrow left icon
Robert Ross Robert Ross
Author Profile Icon Robert Ross
Robert Ross
Carles Sistare Carles Sistare
Author Profile Icon Carles Sistare
Carles Sistare
Joshua B. Humphries Joshua B. Humphries
Author Profile Icon Joshua B. Humphries
Joshua B. Humphries
Backstop Media LLC Backstop Media LLC
Author Profile Icon Backstop Media LLC
Backstop Media LLC
David Konsumer David Konsumer
Author Profile Icon David Konsumer
David Konsumer
David Muto David Muto
Author Profile Icon David Muto
David Muto
+2 more Show less
Arrow right icon
View More author details
Toc

Remote Procedure Calls

RPC stands for Remote Procedure Calls. It is a programming model built on top of request-response network protocols. Issuing an RPC in a client amounts to invoking a procedure from application code. For a server, servicing an RPC amounts to implementing a procedure with a particular signature.

In the client, the objects that expose these procedures are called stubs. When application code invokes a procedure on a stub, the stub translates the arguments into bytes and then sends a request to the server, the contents of which are the serialized arguments. When it gets back a response from the server, it translates the bytes into a result value, which is then returned back to the application code that called it.

In the server, the objects that expose these procedures are service implementations. The server machinery receives the request, translates the bytes back into procedure arguments, and then invokes a procedure on the service implementation, passing it those arguments. The service implementation performs its business logic and then returns a result, either a value on success or an error code on failure. (In some RPC implementations, servers can return both values and an error code). The server machinery then translates this result into bytes, which then become the response that is sent back to the client.

RPC flow

RPC is not a new programming idiom: proposals for remote procedure call semantics were written in the 70’s, and practical RPC implementations appeared in the 80’s, such as the Network File System (NFS).

gRPC is a cross-platform RPC system that supports a wide variety of programming languages. It excels at providing high performance and ease of use, to greatly simplify the construction of all types of distributed systems.

You have been reading a chapter from
Practical gRPC
Published in: Nov 2019
Publisher:
ISBN-13: 9781839211744
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime