-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch multiple parallel requests into a Task #28
Comments
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
Yes that would be great because it would help reduce loading times when doing requests that can be parallelized. Having an Http solution for concurrent request would be great for this would be great. To be a bit more clear @dalen : Should the API only send request concurrently or also synchronize the responses(succeeding when all requests returned) kind of like a Probably also synchronizing the responses I would say, because just sending them concurrently could also be achieved with |
Yeah, the responses should probably be synchronized. Otherwise the separate responses would need separate handling and responses. |
There is some discussion of this topic here. The conclusion so far in that thread is that we should get concrete examples of what people want to accomplish with something like My recommendation would be to open an issue on this repo with the title "Example where parallel requests may be ideal" and then fill the body in with the concrete scenario that you ran into in practice. At this phase, I think it's too early to speculate on the particular API that would result from that. Once we get a couple different people sharing examples here in that particular format, I can organize it into one place and see if there is a design that covers everyone nicely. |
It would be useful if there was a way to send multiple requests as a single task (and have all of them sent in parallel).
As using
Task.map2
to batch multiple tasks together will just run them in sequence.See https://dev.to/rtfeldman/tour-of-an-open-source-elm-spa/comments/7h2
The text was updated successfully, but these errors were encountered: