gRPC

The gRPC feed type in ArcGIS Velocity creates a built-in gRPC path endpoint that can be used to programmatically send data from gRPC clients and applications to Velocity, either in discrete requests or in a continuous stream. gRPC is an open-source remote procedure call framework used to connect distributed applications and services.

Examples

The following are example use cases for the feed:

  • A GIS workshop implemented a custom gRPC client that uses Python to send structured data to Velocity using the gRPC feed.
  • An organization with several data gathering applications, written in different languages, wants to make their data available for geospatial analysis. Custom gRPC clients are developed to send data from their various applications to Velocity using the gRPC feed.

Usage notes

Keep the following in mind when working with the feed:

  • The gRPC feed, including the schema and key field specification, is configured by a Velocity user. Once the feed is created, the gRPC endpoint header path key, gRPC endpoint header path, and gRPC endpoint URL parameters are available on the feed details page. These parameters are required when creating a gRPC client.
  • Set the Authentication type parameter to ArcGIS to use OAuth2.0 authentication. Each incoming message must include a valid token for the owner of the feed. Messages without a valid token are rejected.
  • Data from a gRPC client must be formed as a structured object, which is defined by the velocity_grpc.proto file.
  • The gRPC feed type supports synchronous and asynchronous calls.
  • The gRPC feed type supports client-streaming RPC (multiple requests with a single response) and unary RPC (single request with a single response).
  • In addition to configuring feed connection parameters, a gRPC client needs to be created to send features to Velocity. The gRPC framework supports many development languages. The realtime-grpc-feed GitHub repository contains essential resources such as the velocity_grpc.proto file used to define the contract between the client and the gRPC feed service, developer documentation, and reference implementations that illustrate how to create a gRPC client.
  • To learn more about gRPC capabilities and client development strategies, refer to the gRPC web page.
  • If your schema has fields that may be null, use Any.getDefaultInstance() (in Java) or the equivalent in your programming language to represent the null value. Velocity automatically sets the corresponding field to null in the feature.

Parameters

The following are the parameters for the feed:

ParameterDescriptionData type
Authentication type

Specifies whether incoming messages are authenticated. Options are as follows:

  • None—No authentication is performed.
  • ArcGIS—Each incoming message must include a valid token for the owner of the feed. Messages without a valid token are rejected.

The token must be in the request headers in the following form: Authorization: Bearer <your_token>

String

gRPC endpoint header path key

The key that identifies the feed for routing messages. The key is used with the header path to route messages to the feed.

This parameter is generated and populated by Velocity after the feed is published.

String

gRPC endpoint header path

The path that identifies the feed for routing messages.

This parameter is generated and populated by Velocity after the feed is published.

String

gRPC endpoint URL

The full URL to send messages as defined in the gRPC client channel.

This parameter is generated and populated by Velocity after the feed is published.

String

Consideration and limitation

Consider the following when using the feed:

gRPC feeds using the ArcGIS authentication type can be shared with write privileges to other users and groups. When a gRPC feed is shared with write privileges, users and groups who it is shared with can write data to the feed. Do not share a feed with write privileges turned on if you do not want other users and groups to be able to write data to it. You can turn on and turn off write privileges from the feed details page in Velocity. For details, refer to share feeds.