[L9.3] making multiple parallel requests to remote server
I have to get 20 large(ish) JSON files from a remote server and put the data into a MySQL database. At the moment the process takes ages as one request is made after the other in a procedural fashion. How do I spawn parallel request rather than wait for one to finish before starting the next? I have an inkling that this is done a bit like
<?lasso
{get & process request1}->asasync
{get & process request2}->asasync
.....
{get & process request20}->asasync
while(not all data is in the DB) => {
check if all data is transferred
sleep(5000)
}
'All requests finished'
?>
This would cut down the whole process from 40min to 2-3min.
However, I struggle to find L9 documentation for anything asynchronous and any help is very much appreciated.
Alex
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Aug 13, 2015; 09:46
Brad Lindsay
Re: [L9.3] making multiple parallel requests to remote server