Enabling Client Streaming and Bidirectional Streaming of Telemetry Sensor Information
Starting with Junos OS Release 18.1R1, OpenConfig support through Remote Procedure Calls (gRPC) and JTI is extended to support client streaming and bidirectional streaming of telemetry sensor information on MX Series and PTX Series routers.
APIs are implemented in Junos based on Protobuf specifications for OpenConfig. These APIs perform configuration, operational state retrieval, and telemetry on Junos routers using gRPC as the transport mechanism.
With client streaming, the client sends a stream of requests to the server instead of a single request. The server typically sends back a single response containing status details and optional trailing metadata. With bidirectional streaming, both client and server send a stream of requests and responses. The client starts the operation by invoking the RPC and the server receives the client metadata, method name, and deadline. The server can choose to send back its initial metadata or wait for the client to start sending requests. The client and server can read and write in any order. The streams operate completely independently.
Junos devices can be managed through API (RPC) prototypes:
-
rpc Capabilities (CapabilityRequest)
Returns (CapabilityResponse). Allows the client to retrieve the set of capabilities that is supported by the target.
-
rpc Get (GetRequest)
Returns (GetResponse). Retrieves a snapshot of data from the target.
-
rpc Set (SetRequest)
Returns (SetResponse). Allows the client to modify the state of data on the target.
-
rpc Subscribe (stream SubscribeRequest)
Returns (stream SubscribeResponse). Allows a client to request the target to send it values for particular paths within the data tree. These values may be streamed (STREAM) or sent one-off on a long-lived channel (POLL), or sent as a one-off retrieval (ONCE). If a subscription is made for a top-level container with a sample frequency of 0, leaves with ON_CHANGE support are streamed based on events. Other leaves will not be streamed.
Juniper Extension Toolkit (JET) support provides insight to users regarding the status of
clients connected to JSD. JET support for gRPC includes expanding the maximum number of
clients that can connect to JSD from 8 to 30 (the default remains 5). To specify the maximum
number of connections, include the max-connections
statement at the
[edit system services extension-service request-response grpc
] hierarchy
level.
To provide information regarding the status of clients connected to JSD, issue the enhanced
show extension-service client information
command and include the
clients
or servers
options. The clients
option displays request-response client information. The servers
option
displays request-response server information.