If you absolutely, must have to return the urlfetch result within the same request, I would go with a UI change.
For instance, if you go to Expedia/Travelocity and search for flights, you'll see a long "Expedia is searching for the best deal" page with a stylized loading bar. On the backend, obviously these travel sites are doing a lot of work, connecting to computer systems of airlines, etc. When the site is done searching, it redirects you (or changes with AJAX) to a page with travel deals. You can do the same. When your request comes in on the server, immediately enqueue a task, and send back a "Loading..." page to the user. The task queue can invoke another servlet to handle all the processing, and retry urlfetches as needed. When everything is done, write the result to the datastore. In the interim, the client side loading page will periodically check back in with the server (with AJAX or you can simply reload the same loading page). When the loading page detects that processing is complete, send the results back to the user (AJAX, or redirect to another url). -Vinny P On Thursday, October 25, 2012 12:28:05 PM UTC-5, Deepak Singh wrote: > > No. I can not go for task as it is not for backend. I need to return > result with request. > > So will it be better to use our old HttpurlConnection with threadManager ? > > What you say guys.. > > On Thu, Oct 25, 2012 at 10:27 PM, Joshua Smith > <[email protected]<javascript:> > > wrote: > >> I use the python version, and get a couple failures a day. The easy >> answer is to treat it just like mail: always use a task, so that if it >> fails, it will retry. >> >> On Oct 25, 2012, at 12:12 PM, Deepak Singh >> <[email protected]<javascript:>> >> wrote: >> >> Hi Alll, >> >> I want to discuss here your experience about GAE Java URLFetchService. >> >> We are using async feature of this service to retrieve data from 3rd >> party servers and our business mainly depends on the data received from >> their servers. >> I observe that UrlFetch fails many times with java.io exception and thus >> we lose our business. >> >> So i would like to know your experience about its reliability, >> DeadlineExceededException cases, ways to handle it and all. >> >> Let us know how reliable is URLFetchService(GAE Java) ? >> >> Regards >> Deepak Singh >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" group. >> To post to this group, send email to >> [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/google-appengine?hl=en. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" group. >> To post to this group, send email to >> [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/google-appengine?hl=en. >> > > > > -- > Deepak Singh > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/4jraYqdozSAJ. 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?hl=en.
