It might help if I explain one of my use cases a little better.

I have a pretty simple HTML5 based mobile site for Android and iPhone.  Most
of the resources are small, and the CSS and images and JS are for the most
part aggregated and minified much the same way that GWT does to keep the
number of rounds trips to a minimum.

When a user hits the site, the UI is quickly rendered and most of the
information they retrieve is in the form of very quick AJAX/JSON responses.
 However when they log in, I need to pull down their personal data from a
third party webservice.  That third party webservice has latency in its
replies that could range from 1 second to about 20 or so.  Most (maybe 75%)
of these fetches are sub-10 seconds.  I cache the response in the client
with localStorage.

I have no way of knowing if the user will have a 1 second latency on their
data or 25 seconds before hand.  If I make all calls go through the offline
task queue first, I'm adding extra latency for 75% of my users. Not to
mention quite a bit of complexity to an otherwise relatively simple
application.


It just seems to me that if we can already hold a connection from the client
to GAE for 30 seconds, then having it fetch on the server for 25 shouldn't
matter.  I wouldn't be surprised if there was a technical reason for sniping
the fetches at 10 seconds, but I'd love to hear what it is.


Luis




On Fri, Jun 17, 2011 at 6:57 AM, Ikai Lan (Google) <[email protected]>wrote:

> It doesn't hold up the UI but it effectively blocks a connection. With
> multithreaded Java this isn't an issue, I suppose - but it will raise your
> average user facing latency and your application will not autoscale if it is
> frequent. If it is not frequent, the quote usage from the Channel API will
> be minimal.
>
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog: http://googleappengine.blogspot.com
> Twitter: http://twitter.com/app_engine
> Reddit: http://www.reddit.com/r/appengine
>
>
>
> On Fri, Jun 17, 2011 at 11:56 AM, Luis Montes <[email protected]> wrote:
>
>> It's not in a task queue or cron job.  It's definitely not holding up the
>> UI since the fetch is happening in an AJAX call and the user knows that the
>> call will take a few seconds.
>>
>> Putting it in a task queue means i have to store the results and poll the
>> server to check if the results have finished, or use the channel API to push
>> a notification back to the client.  Those approaches both use more quota
>> than would simply allowing for more time on a normal fetch.
>>
>> Luis
>>
>>
>>
>>
>>
>> On Thu, Jun 16, 2011 at 6:33 PM, Ikai Lan (Google) <[email protected]>wrote:
>>
>>> Are you doing the urlfetch in an offline call (task queue or cron)? If
>>> so, the limit should be higher than 10 seconds as of SDK 1.4.1.
>>>
>>> I hope this isn't an "online" call, because it would suck for a user to
>>> wait 30 seconds before a page load. You're better off showing the user a
>>> loading screen, handing the job to a task queue, then updating the page when
>>> the fetch has finished.
>>>
>>> Ikai Lan
>>> Developer Programs Engineer, Google App Engine
>>> Blog: http://googleappengine.blogspot.com
>>> Twitter: http://twitter.com/app_engine
>>> Reddit: http://www.reddit.com/r/appengine
>>>
>>>
>>>
>>> On Fri, Jun 17, 2011 at 7:42 AM, Luis Montes <[email protected]> wrote:
>>>
>>>> I understand why there's a 30 second limit for an http connection to
>>>> GAE, but I don't understand why server to server URL fetches get timed out
>>>> at 10 seconds.
>>>>
>>>> Seems like as long as you finish up all your processing in less than 30
>>>> you should be fine.  How about upping the URL fetch max to 29 seconds?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Luis
>>>>
>>>>  --
>>>> 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
>>>> [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> 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
>>> [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> 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
>> [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> 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
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to