How to implement the behavior like Promise.all() with javascript service ?
Hi,
In my case, I need to list 20 entries per page in the mashup. one of column of the entry need to request data from external system(WMS) using RESTful call. The performance must will be bad if send 20 requests one by one , so I want to send the 20 requests together in parallel and then fill the result when all of the request get finished , the similar mechanism like Promise.all() .
one possible approach may be :
- define a session variable as the indicator of finishing all request
- send the requests asynchronously
- raise event in each request when get finished
- the event subscription update the session variable
- the main program check session variable in a while loop to know if all of the request get finished
but Is there a more concise solution for the case ?
Regards,
Sean

