Here's one thing that never made sense to me: lets say a request comes in and data needs to be collected from 3 different sources, A, B, and C before a response can be given back to the client. You say that it would take max(A, B, C) in order to retrieve all the data. Consider this pretty standard snippet:
function get(source, callback) {
var result = getData(source);
callback(result);
}
get(A, function(result) {
get(B, function(result) {
get(C, function(result) {
// CREATE RESPONSE WITH A, B, AND C HERE
});
});
});
Wouldn't you have to wait for the data to be retrieved before running the next callback resulting in a time of A + B + C anyways? Am I missing something about the way to retrieve data from multiple sources? I don't see how max(A, B, C) is possible while still knowing for sure when all the data has been collected.