How to handle an HTTP stream using Dart

cross reference from dartisans G + where I still haven't received a response:

Q: how to perform (asynchronous) simultaneous thread downloads.

Hi, I'm still studying Dart and for training I want to create a web page from which I can get data from 1 to 10 URLs, which are HTTP binary data streams. As soon as I get a piece of data from each stream at the same time, I then perform the calculations and move on to the next snippets, etc., Ad lib. I need parallelism because the client has much more network bands than the servers. Also, I don’t want to fully load every URL that they are too large to fit in memory or even local storage. Actually, this is very similar to streaming video, but this is not video data, but binary data, and instead of displaying the data, I just do some calculations, and I do it in many streams at a time.

Can I do this with Darth and how? do dart: io or dart: async have classes that I can use for this? Do I need to use "webworkers" to create 1 to 10 concurrent HTTP requests?

Any pointers / tips / similar samples would be appreciated.

tl; dr: how to process an HTTP stream of a data stream with a piece and how to parallelize it to process many streams simultaneously.

+2
source share

All Articles