Skip to Content
Learning API Styles
book

Learning API Styles

by Lukasz Dynowski, Marcin Dulak
July 2025
Intermediate to advanced
414 pages
10h 22m
English
O'Reilly Media, Inc.
Content preview from Learning API Styles

Chapter 8. gRPC

RPC stands for Remote Procedure Call. As the name suggests, the RPC API style focuses on interaction with APIs by invoking remote procedures (functions). RPC APIs are characterized by intent-oriented interfaces, where an intent describes specific actions (operations), such as “CreateUser” or “GenerateReport.” This approach lies on the opposite side of the spectrum compared to REST. REST focuses on retrieval and modification of resources,1 like “User” and “Report,” using standardized HTTP methods like GET, POST, PUT, and DELETE.

gRPC2 may currently be the most widely adopted RPC implementation.3 It describes itself as a “high performance, open source universal RPC framework.” The project was created by Google, and in 2017, it was donated to the Cloud Native Computing Foundation, which hosts it at https://grpc.io.

After describing the overall goals of RPCs, this chapter introduces you to gRPC and its features. You’ll explore Protocol Buffers (the binary serialization format) and the HTTP/2 protocol (the transport mechanism used by gRPC; see “HTTP/2”). Using an implementation of an ECHO service, you’ll become familiar with the four RPC types supported by gRPC: unary, server streaming, client streaming, and bidirectional streaming. Next, using gRPC, you’ll enrich the WFS’s web feed from Chapter 7, with the content generated by a locally running LLM. The chapter ends with a discussion of gRPC security aspects, documentation, and trade-offs.

Remote Procedure Call

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Design and Build Great Web APIs

Design and Build Great Web APIs

Mike Amundsen
Mastering API Architecture

Mastering API Architecture

James Gough, Daniel Bryant, Matthew Auburn
Clean Code Fundamentals

Clean Code Fundamentals

Robert C. Martin

Publisher Resources

ISBN: 9781098153984Errata Page