liveBook · Manning

gRPC

As explained in Quarkus in Action

gRPC is a high-performance, open-source remote procedure call framework for communication between distributed services with support for multiple programming languages.

gRPC is an open-source remote procedure call framework designed for communication between distributed services, particularly microservice architectures. It addresses latency and payload-size concerns with binary serialization and multiplexing over a single connection. section 4.6 section 4.6.1

Protocol Buffers define the messages and remote methods. Quarkus detects proto files under src/main/proto during compilation, generates Java classes and client/server stubs, and leaves the business implementation to the developer. section 4.10 section 4.7

A typical Quarkus gRPC workflow is:

  • Compile with `./mvnw clean package` so Quarkus generates the Java model, service base classes, and client stubs. section 4.7
  • Implement the server methods and invoke them from clients through the generated stubs. section 4.7

Inventory service

An InventoryService can expose add and remove RPC methods. The add method accepts an InsertCarRequest and the remove method accepts a RemoveCarRequest; both return CarResponse. The response includes an automatically generated ID, while the insertion request does not allow the client to provide one. section 4.7

Figure 4.5 Visualizing the value of multiplexing in HTTP2
figure

Compare serialized HTTP/1.1 request handling with HTTP/2 multiplexing to see why concurrent gRPC calls can reduce latency. section 4.6.1

How Quarkus in Action covers it

How deep it goes
Explains latency mechanisms, contracts, Quarkus generation, stubs, and an inventory implementation without detailing wire-level internals.
Examples
Uses an InventoryService contract with add and remove operations, generated Java artifacts, and an inventory command-line client.
What it assumes
Assumes basic service communication knowledge while teaching gRPC integration from an introductory overview.
What you can do after
Build gRPC services in Quarkus from proto contracts and consume them through generated client stubs.
How it connects
Connects gRPC with Protocol Buffers, HTTP/2, multiplexing, REST, GraphQL, and microservice architectures.

Also explained in

Compare how 10 books explain gRPC →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quarkus in Action. The section links point to the parts of the book it draws on.