gRPC
The gRPC feed type in ArcGIS Velocity creates a built-in gRPC path endpoint. You can use this endpoint 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 that connects 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 apps, written in different languages, wants to make its data available for geospatial analysis. The organization develops custom gRPC clients to send data from its applications to Velocity using the gRPC feed.
Usage notes
Note the following when working with the feed:
A Velocity user configures the gRPC feed, including the schema and key field specification. After creating the feed, the gRPC endpoint header path key, gRPC endpoint header path, and gRPC endpoint URL parameters appear on the feed details page. You need these parameters to create a gRPC client.
Set the Authentication type parameter to ArcGIS to use OAuth 2.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 structured as an object, as defined by the
velocity_grpc.protofile.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, you need to create a gRPC client to send features to Velocity. The gRPC framework supports many development languages. The realtime-grpc-feed GitHub repository contains resources such as the
velocity_grpc.protofile that defines the contract between the client and the gRPC feed service, developer documentation, and reference implementations that show 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.When the data format for the gRPC feed is set to JSON or XML, the gRPC feed processes the incoming message and flattens the JSON or XML. In addition to JSON and XML, the feed also supports a delimited data format.
You can flatten arrays and provide specific array flattening exemptions. Separate multiple array flattening exemptions with commas.
Parameters
The following table describes the parameters for the feed:
|
Parameter |
Description |
Data type |
|---|---|---|
|
Authentication type |
Specifies whether incoming messages are authenticated. Options are as follows:
Include the token in the request header in the following format: |
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. Velocity generates and populates this parameter after the feed is published. |
String |
|
gRPC endpoint header path |
The path that identifies the feed for routing messages. Velocity generates and populates this parameter after the feed is published. |
String |
|
gRPC endpoint URL |
The full URL to send messages as defined in the gRPC client channel. Velocity generates and populates this parameter after the feed is published. |
String |
Consideration and limitation
Consider the following when using the feed:
You can share gRPC feeds that use ArcGIS authentication with write privileges to other users and groups. Once shared, those users and groups can write data to the feed. If you do not want others to write data to the feed, turn off write privileges. You can turn write privileges on or off from the feed details page in Velocity. For details, refer to share feeds.