I have a website that calls a web service to process a list of addresses multiple times. I'd like the user to get their results faster and am already using promises and deferred to process the results. I'm sending the requests like this currently:
- first 25 in a batch
- Next 25 as single requests, most request will process under 50 addresses
- Next 50 as 5 request batches
- batches of 50 until everything is sent
Instead of this I'd like to send a percentage of the array to be processed (I can process up to 10000) then some single request for one of the 3 sockets, 25 for the next 2, then when the big one comes back send another large percentage. Every once in awhile a single request can take much longer to process also.