Issue 871 in google-api-java-client: Support for App Engine asynchronous URL Fetch

5 views
Skip to first unread message

google-api-...@googlecode.com

unread,
Apr 14, 2014, 2:39:56 PM4/14/14
to google-api-jav...@googlegroups.com
Status: New
Owner: wonder...@google.com
Labels: Type-Defect Priority-Medium

New issue 871 by jlo...@google.com: Support for App Engine asynchronous URL
Fetch
http://code.google.com/p/google-api-java-client/issues/detail?id=871

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







--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

google-api-...@googlecode.com

unread,
Dec 30, 2014, 11:25:49 AM12/30/14
to google-api-jav...@googlegroups.com
Updates:
Status: WontFix
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

Comment #1 on issue 871 by wonder...@google.com: Support for App Engine
asynchronous URL Fetch
https://code.google.com/p/google-api-java-client/issues/detail?id=871

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().

google-api-...@googlecode.com

unread,
Dec 30, 2014, 12:56:15 PM12/30/14
to google-api-jav...@googlegroups.com

Comment #2 on issue 871 by al...@streak.com: Support for App Engine
#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?

google-api-...@googlecode.com

unread,
Dec 30, 2014, 1:52:22 PM12/30/14
to google-api-jav...@googlegroups.com

Comment #3 on issue 871 by wonder...@google.com: Support for App Engine
It just starts a new thread and returns a Future.

google-api-...@googlecode.com

unread,
Jan 2, 2015, 11:13:21 AM1/2/15
to google-api-jav...@googlegroups.com
Updates:
Status: Moved

Comment #4 on issue 871 by wonder...@google.com: Support for App Engine
Moved to: Issue google-http-java-client:276
Reply all
Reply to author
Forward
0 new messages