Hi Deepak,
Try to adapt this pyton code. It works for me with no need for  GAE 1.7.2 
threads ;)

        def callback(rpc, url):
            return lambda: self.HandleUrlResponse(rpc, url)
            
        rpcs = []
urlList = # url list to be processed goes here
        for url in urlList:
            rpc = urlfetch.create_rpc(deadline=30)# max for normal requests 
is 10 seconds, but this way we allow 30 seconds for asynchronous calls
            rpc.callback = callback(rpc, url)
            rpcs.append(rpc)
            urlfetch.make_fetch_call(rpc = rpc, 
                                     url=url,
                                     method=urlfetch.GET)
        for rpc in rpcs:
            rpc.wait() # wait for all the processes to finish (if you need 
to use processed data)

    def HandleUrlResponse(self, rpc, url):
        success = True
        try:
            response = rpc.get_result()
        except:
            success = False
        
        if success == True:    
            if response.status_code != 200:
                # Handle failure.
            else:
# Process HTML response
        return


On Saturday, October 20, 2012 11:51:24 AM UTC-3, Deepak Singh wrote:
>
> Any response ????
>
> On Fri, Oct 19, 2012 at 8:38 PM, Deepak Singh 
> <[email protected]<javascript:>
> > wrote:
>
>> Hi,
>>
>> I have a situation like mentioned below:
>>
>> I am building an app GWT + GAE for online hotel booking.
>>
>> I make an ajax call to my server.
>> My server has to hit 3 web services running on different-different 
>> servers. Each of them takes few seconds to return the response.
>> If i hit them one-by-one, it takes a lot of time to gather all results, 
>> merge them and process ahead.
>> So i am planning to handle them by using threads as announced in GAE 
>> 1.7.2. 
>>
>> Is this a right decision or there anything else which i can do ?
>>
>> If Yes, then how will session will come into picture here and what else 
>> do i need to do to handle session with thread ?
>>  
>>
>> Thanks
>> Deepak
>>  
>
>
>
> -- 
> 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/-/BRDHQmQ85f4J.
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.

Reply via email to