This functionality will be available in the low-level URLFetch API,
hopefully in the next release.

I have not implemented it for java.net.URLConnection, although we could
potentially do that in the future (by having connect() initiate the request
and having methods like getContent and getInputStream block until it
completes).

On Wed, Jan 20, 2010 at 3:19 PM, Jeff Schnitzer <j...@infohazard.org> wrote:

> Sorry if this is a silly question but...
>
> How do you make an asynchronous URLFetch call in Java?  Is this a
> question of making calls to fetch() without calling getContent() on
> the response?
>
> Jeff
>
> >> I see no limit of "simultaneous [urlfetch] API calls" documented on
> >> the quotas page ( http://code.google.com/appengine/docs/quotas.html ).
> >> I only see a limit of 32000 calls per minute. There is a "simultaneous
> >> dynamic requests" of 30 mentioned on the java runtime page (
> >> http://code.google.com/appengine/docs/java/taskqueue/overview.html ),
> >> but I assume that would not apply to asynchronous URLFetch calls.
> >> Which limit are you referring to, and where is it documented?
> >>
> >
> > Each request can have 10 outstanding asynchronous API calls.  That is, if
> > you begin a request and begin 10 asynchronous URLFetch API calls, when
> you
> > attempt to begin the 11th call it will block until one of the existing 10
> > calls completes.
> > This is separate from both the URLFetch-related quotas and then
> simultaneous
> > request limit.  This limit pertains to each request individually.
> > This doesn't appear to be documented very well.  I'll make sure this is
> > mentioned for both Python and Java.
> >
> >>
> >> On Jan 19, 2:13 pm, Don Schwarz <schwa...@google.com> wrote:
> >> > I just responded to the other thread you pinged, but I'll respond here
> >> > too
> >> > for completeness.
> >> >
> >> > I've now
> >> > markedhttp://
> code.google.com/p/googleappengine/issues/detail?id=1899as
> >> > Acknowledged.  It is currently on schedule to be included in the next
> >> > release.  If you want to help us test it out before that time, please
> >> > contact me privately and I may be able to facilitate that.
> >> >
> >> > However, please note that in Java, as in the current Python API, each
> >> > request is limited to 10 simultaneous API calls.  You cannot "fire off
> >> > several hundred URLFetch calls at a time."  The URLFetch call quota,
> as
> >> > with
> >> > all of the non-billable quotas, is designed to protect us from
> >> > applications
> >> > that are abusing a particular resource.  You shouldn't view them as a
> >> > "right", but more of an additional constraint.
> >> >
> >> > On Mon, Jan 18, 2010 at 9:45 AM, Locke <locke2...@gmail.com> wrote:
> >> > > We are limited to 32,000 URLFetch calls per minute (that's 533 per
> >> > > second).
> >> >
> >> > > In Python, one could use the .create_rpc() method to fire off
> several
> >> > > hundred URLFetch calls at a time.
> >> >
> >> > > But in Java, it is absolutely impossible, as far as I can tell, to
> >> > > execute more than a tiny fraction of the allowed amount. To have
> just
> >> > > two URLFetch calls going at a time, you need to use the TaskQueue.
> But
> >> > > the TaskQueue has severe limitations. It can have a maximum of 20
> >> > > simultaneous calls (no matter how many users you have). And each of
> >> > > those calls eats into your "simultaneous dynamic request limit" of
> 30/
> >> > > second (actually less than that, in my experience).
> >> >
> >> > > Has anyone found a way to get Java's URLFetch working at the same
> >> > > level as Python's URLFetch? Or will Java apps never be able to use
> >> > > even small percentage of the allotted URLFetch quotas?
> >> >
> >> > > --
> >> > > You received this message because you are subscribed to the Google
> >> > > Groups
> >> > > "Google App Engine for Java" group.
> >> > > To post to this group, send email to
> >> > > google-appengine-j...@googlegroups.com.
> >> > > To unsubscribe from this group, send email to
> >> > >
> >> > > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> <google-appengine-java%2bunsubscr...@googlegroups.com<google-appengine-java%252bunsubscr...@googlegroups.com>
> >
> >> > > .
> >> > > For more options, visit this group at
> >> > >http://groups.google.com/group/google-appengine-java?hl=en.
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Google App Engine for Java" group.
> >> To post to this group, send email to
> >> google-appengine-j...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/google-appengine-java?hl=en.
> >>
> >>
> >>
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> > http://groups.google.com/group/google-appengine-java?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>
>
>
--
You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to