Imagine I have a node.js program that has to get 100 rows of data from a server at a time, I want to process each row individually that is returned and when say only 10 rows are remaining to be processed I want to download the next 100 rows.
If I used the async module in node.js, what is the 'correct' approach to do this. Is a cargo, queue or something else considered best practice and how best to trigger when to start loading more rows?
Copyright Notice:Content Author:「sradforth」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/36896489/how-best-to-do-async-batched-work-in-node-js