Skip to main content

gRPC

gRPC is a robust open-source high performance Remote Procedure Call (RPC) framework used to develop scalable and fast APIs. The core concept in grpc is streaming where several things happen in a single request. Protocol buffers are used instead of JSON to handle request/response multiplexing.

Prerequisite

  • Connection Parameters: To establish a successful connection, gather the following information:
    • Host: The host address (IP or domain) where the gRPC server is located.
    • Port: The port number on which the gRPC server is listening for incoming connections.
    • Proto Type File Details: Information about the Protocol Buffers (Proto) type file that defines the service methods and message types for communication.

Configuring API Connector in DronaHQ

Set up your API connector by entering the required details. Ensure Connector connection using the Test connection option. Once verified, click Save to save your configuration settings.

General

FieldDescription
HostThe host address (IP or domain) where the gRPC server is located.
PortThe port number on which the gRPC server is listening for incoming connections.
Meta DataKey-value pairs that you can add as headers for each API call, if needed.
Proto FileInformation about the Protocol Buffers (Proto) type file that defines the service methods and message types for communication.
gRPC with Sample details.
gRPC with Sample details.

Authentication

Authentication TypeDescription
NoneNo authentication required.
OAuth V2Authenticate using OAuth version 2.0 protocol.

Adding API Queries

To incorporate API queries using gRPC, follow these steps:

  1. Query Name: Assign a unique and meaningful name to your query, making it easily identifiable.

  2. Service: Specify the service that you intend to interact with through your API query.

  3. Method: Define the method within the chosen service that you will be utilizing for your API query.

  4. Data: Provide the necessary data for your query. This may include various parameters, depending on the method's requirements. For instance, if you're invoking a method named "Welcome" and the required data is a JSON object, format it as follows:

    {
    "name": "Welcome"
    }
    Translate Query
    Translate Query
tip

Utilize double curly brackets for incorporating dynamic variables. Prior to saving, test with sample values. Associate dynamic variables with controls/actions for real-time utilization.

Your saved queries will be visible beneath your connector within the Connector Library.

Using gRPC Connector

  1. Access Data Bind Section or Control Action:

    • Navigate to the data bind section of the control.
  2. Provided Data for Query or Interaction:

    • Depending on the selected gRPC method, input required data parameters. For instance, if you're using a method called "Welcome," structure the data as JSON:

      {
      "name": "Welcome"
      }
      Translate Query
      Translate Query
  1. Place the Table grid control from the Controls section. Select gRPC Connector from Data Bind Options. Navigate to Data Bind Options -> Quick Select -> Connector Queries.
output of Query