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
We don't have a plan for adding async support to this library at the moment. I am intending to close this as a low priority feature request, unless there's a strong need in the future.
HttpRequest.executeAsync() is a semi-async implementation, i.e., you have to poll the status of the future, instead of being called back. In terms of App Engine, there isn't a special App Engine client in any way. There's an HttpTransport that's AppEngine specific, but the client you use on AppEngine extends the same AbstractGoogleJsonClient, which has access to HttpRequest.executeAsync(). A small trick is to call AbstractGoogleClientRequest.buildHttpRequest().executeAsync().
#1 - will calling AbstractGoogleClientRequest.buildHttpRequest().executeAsync() while using the Appengine Transport use appengine's underlying urlfetch.getAsync() or does AbstractGoogleClientRequest.buildHttpRequest().executeAsync() just start a new thread?
From [email protected] on April 14, 2014 11:39:44
Java environment: App Engine
This is a feature request to provide support for App Engine's async URL Fetch which is documented here: https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/URLFetchService#fetchAsync(com.google.appengine.api.urlfetch.HTTPRequest) Support needs to be added to the App Engine client to return a Future: https://code.google.com/p/google-http-java-client/source/browse/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchRequest.java In addition, the generated libraries need to support handling Future objects.
For example, when using the BigQuery client library: https://developers.google.com/api-client-library/java/apis/bigquery/v2 You would need to be able to do a streaming insert as documented here, in a way which returned a Future: https://developers.google.com/bigquery/streaming-data-into-bigquery The benefit is that you may not have to pay additional frontend instance hours while waiting for a streaming insert to return, if your App Engine code could be doing other work.
Note that there is an HTTPRequest.executeAsync() method available in beta, though it has not been added to the App Engine client: https://code.google.com/p/google-http-java-client/source/browse/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#1071
Original issue: http://code.google.com/p/google-api-java-client/issues/detail?id=871
The text was updated successfully, but these errors were encountered: