Skip to content

sahandilshan/siddhi-io-grpc

 
 

Repository files navigation

siddhi-io-grpc

Jenkins Build Status GitHub (pre-)Release GitHub (Pre-)Release Date GitHub Open Issues GitHub Last Commit License

The siddhi-io-grpc extension is an extension to Siddhi that receives and publishes events via gRPC protocol, calls external services, and serves incoming requests and provide responses.

For information on Siddhi and it's features refer Siddhi Documentation.

Download

Latest API Docs

Latest API Docs is 1.0.8.

Features

The siddhi-io-grpc have two difference implementations,

  • Default gRPC service (EventService) service
  • Generic (Custom) gRPC service implementation

In the default gRPC implementation Siddhi has a predefined gRPC service class called EventService which can receive and publish events as JSON, XML and Text.

In the generic gRPC implementation, we can define a custom gRPC service and use that service with siddhi-io-grpc to receive and publish events as Protobuf messages. But it is required to create a jar with the auto-generated Protobuf and gRPC classes and add that jar in to the {SIDDHI_HOME}/jars directory.

  • grpc (Sink)

    grpc sink publishes events to a given gRPC service. We can use this sink when we just want to publish an event from Siddhi, and when we expect an empty response back from the gRPC server (Fire and forget). We can also use stream methods (client stream) with this sink to publish a stream of requests.

  • grpc-call (Sink)

    grpc-call sink publishes events to a given gRPC service and expects a response back. In default mode this will use EventService process method. grpc-call-response source is used to receive the responses. A unique sink.id is used to correlate between the sink and its corresponding source.

  • grpc-service-response (Sink)

    This extension is used to send responses back to a gRPC client after receiving requests through grpc-service source. This correlates with the particular source using a unique source.id.

  • grpc (Source)

    grpc source keeps listening to gRPC clients and gets the request into the relevant Siddhi streams from those clients. Once the grpc source gets the request from the client it sends an empty response back to the client. We can also use stream methods (client stream) with this source to receive a stream of requests that publish from clients.

  • grpc-call-response (Source)

    This grpc source receives responses received from gRPC server for requests sent from a grpc-call sink. The source will receive responses for the sink with the same sink.id. For example, if you have a grpc sink with sink.id 15 then we need to set the sink.id as 15 in the source to receives responses. Sinks and sources have 1:1 mapping.

  • grpc-service (Source)

    gRPC service source receives requests from gRPC clients and sends responses back to those clients. grpc-service-response sink is used to send responses back to those clients. A unique source.id is used to correlate between the source and its corresponding sink.

Dependencies

Add following protobuf jar into {SIDDHI_HOME}/bundles

Installation

For installing this extension on various siddhi execution environments refer Siddhi documentation section on adding extensions.

Support and Contribution

  • We encourage users to ask questions and get support via StackOverflow, make sure to add the siddhi tag to the issue for better response.

  • If you find any issues related to the extension please report them on the issue tracker.

  • For production support and other contribution related information refer Siddhi Community documentation.

About

Extension that allows you to receive and publish events via gRPC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%