User guide – gRPC
Warning
Currently (as of 3.0.0 release) the gRPC module is not implemented. The API is not available, and it is expected to be restored in 3.1.0 release.
This guide explains the functionalities of the jelly-grpc module, which implements a gRPC client and server for the Jelly gRPC streaming protocol.
Prerequisites
If you are unfamiliar with gRPC, we recommend you first read some introductory material on the gRPC website or in the Apache Pekko gRPC documentation.
The jelly-grpc module builds on the functionalities of jelly-stream, so we recommend you first read the Apache Pekko reactive streaming guide.
You may also want to first skim the Jelly gRPC streaming protocol specification to understand the protocol's structure.
As with the jelly-stream module, you can use jelly-grpc with any RDF library that has a Jelly integration, such as Apache Jena (using jelly-jena) or RDF4J (using jelly-rdf4j). The gRPC API is generic and identical across all libraries.
Making a gRPC server and client
jelly-grpc builds on the Apache Pekko gRPC library. Jelly-JVM provides boilerplate code for setting up a gRPC server and client that can send and receive Jelly streams, as shown in the example below:
The classes provided in jelly-grpc should cover most cases, but they only serve as the boilerplate. You must yourself define the logic for handling the incoming and outgoing streams, as shown in the example above.
Of course, you can also implement the server or the client from scratch, if you want to.