You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2023. It is now read-only.
Ability to initiate a LRO ApiCall and return result as soon as initial http response arrives.
Ability to pause and resume the LRO polling
Today our SDKs expose "Begin[Operation]Async" variant which address #1. Where we are lacking is, a way to transform return value of #1 so that it can be used for #2 (to resume/pause polling).
As we all know there are various way to accomplish this. For instance, In Java runtime v1, the "Begin[Operation]Async" returns Single<PollingState>, the runtime expose another method "PollOnceAsync (PollingState state)" which poll once and return Single<PollingState> that contains the latest polling state. [In Java Single is somewhat similar to C# Task or Node.js promise, there are differences but let's keep it simple in this discussion].
In python SDK, we have the concept of LRO Poller, which expose methods to start an LRO, check LRO is done or in progress, wait for LRO to finish (with an optional timeout). Laurent is also enabling custom poller.
Go SDK also has a variant this, which use Future. I’m not sure about “pausing” support though.
One advise from @anuchandy who implemented this in Java is - approaching this problem with a serializable and re-hydratable Polling State in mind enables us to coming up with a design which is loosely coupled. This will also enable us to share polling state between SDKs. For instance we can start LRO in Java and continue polling using python/cli or the TS sdk in the browser.
The text was updated successfully, but these errors were encountered:
The two requirements are:
Today our SDKs expose "Begin[Operation]Async" variant which address #1. Where we are lacking is, a way to transform return value of #1 so that it can be used for #2 (to resume/pause polling).
As we all know there are various way to accomplish this. For instance, In Java runtime v1, the "Begin[Operation]Async" returns Single<PollingState>, the runtime expose another method "PollOnceAsync (PollingState state)" which poll once and return Single<PollingState> that contains the latest polling state. [In Java Single is somewhat similar to C# Task or Node.js promise, there are differences but let's keep it simple in this discussion].
In python SDK, we have the concept of LRO Poller, which expose methods to start an LRO, check LRO is done or in progress, wait for LRO to finish (with an optional timeout). Laurent is also enabling custom poller.
Go SDK also has a variant this, which use Future. I’m not sure about “pausing” support though.
One advise from @anuchandy who implemented this in Java is - approaching this problem with a serializable and re-hydratable Polling State in mind enables us to coming up with a design which is loosely coupled. This will also enable us to share polling state between SDKs. For instance we can start LRO in Java and continue polling using python/cli or the TS sdk in the browser.
The text was updated successfully, but these errors were encountered: