stretchr / sdk-js

HTML5 and JavaScript SDK for Stretchr
http://docs.stretchr.com/sdks/javascript.md
3 stars 0 forks source link

Add concurrent loading of multiple resources #30

Open matryer opened 10 years ago

mazondo commented 10 years ago

What's this do? Should it be a plugin?

matryer commented 10 years ago

Let’s you load 100 pages by firing off 10 requests at a time… stitches the responses back together after.

Mat

On Feb 28, 2014, at 4:01 PM, Ryan notifications@github.com wrote:

What's this do? Should it be a plugin?

— Reply to this email directly or view it on GitHub.

mazondo commented 10 years ago

That's pretty cool. Maybe you could do something like

stretchr.at("path/here").all({
  each: function(response) {
    //things that happen for each response
  },
  success: function(response) {
    //things that happen when done and merged together
  }
})
mazondo commented 10 years ago

I suppose the question would be: Does the output of each impact the merged results at all, or does it just let you get a jumpstart on results as they're coming in.

matryer commented 10 years ago

Love that.

Could even be:

{
  each: function(response, total, countSoFar) {}
}

Would make building progress bars very easy.

On Mar 9, 2014, at 1:07 PM, Ryan notifications@github.com wrote:

That's pretty cool. Maybe you could do something like

stretchr.at("path/here").all({ each: function(response) { //things that happen for each response }, success: function(response) { //things that happen when done and merged together } }) — Reply to this email directly or view it on GitHub.