Multiple calls to webservice [closed]

1

I'd like to know the best way to make N calls to the same Webservice.

Example: In a hotel search / quote system, as a strategy, we use N calls for a specific quote because each call is sent a different Business Agreement, then the best price is displayed based on all requests of response.

In the current scenario, we have an average of 20 requests per quote, but it is very slow because one call is made after another, always waiting for the return to proceed.

I thought of using Threads to make all the calls in parallel and theoretically the total time will be more or less the time of a call, taking into consideration that all will be triggered at the same time.

I would like to know what is the best way to handle this situation, would Thread be the solution? If so, is there any strategy for this? If not, what would be the best way?

    
asked by anonymous 06.09.2017 / 14:01

0 answers