Back to Catalog

Streaming messages between client&server services using gRPC

BeginnerGuided Project

Learn how to use gRPC unary calls, server streaming, client streaming, and bidirectional streaming to communicate between Java client and server services with Open Liberty.

4.8 (9 Reviews)

Language

  • English

Topic

  • Open Liberty

Skills You Will Learn

  • Java

Offered By

  • IBM

Estimated Effort

  • 30 minutes

Platform

  • SkillsNetwork

Last Update

  • April 29, 2024
About This Guided Project
You will learn how to create gRPC services and their clients by using protocol buffers and how to implement them with Open Liberty. You will use Maven to generate the gRPC stubs, deploy the services, and to interact with the running Liberty runtime.
The application that you will build in this guide consists of three projects: the systemproto model project, the query client service, and the system server service.
The query service implements four RESTful APIs by using four different gRPC streaming methods.
  • Unary RPC: The client sends a single request and receives a single response.
  • Server streaming RPC: The client sends a single request and the server returns a stream of messages.
  • Client streaming RPC: The client sends a stream of messages and the server responds with a single message.
  • Bidirectional RPC: Both client and server send a stream of messages. The client and server can read and write messages in any order.