ydk-gen icon indicating copy to clipboard operation
ydk-gen copied to clipboard

Async support for XYZServiceProviders

Open ganesh-karthick opened this issue 7 years ago • 0 comments

Support for async rpc calls to devices via different service providers. Netconf transactions commit could be slow for some devices, where it takes 60 second for synchronous reply. It would be good, if ydk supports async rpc semantics where instead of blocking calls, future results could be gotten later for the rpc.

Example of GRPC async call


A synchronous call to the simple RPC GetFeature is nearly as straightforward as calling a local method. The RPC call waits for the server to respond, and will either return a response or raise an exception:

feature = stub.GetFeature(point)

An asynchronous call to GetFeature is similar, but like calling a local method asynchronously in a thread pool:

feature_future = stub.GetFeature.future(point)
feature = feature_future.result()

Async NetConf RPC

ganesh-karthick avatar Nov 28 '17 19:11 ganesh-karthick