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
Default demand should be 1 #72
Comments
ugh, hit enter too early, please hold.... |
ok we're good now. |
Honestly I would say it is best to break expectations upfront. If people are expecting it to flow one item at a time then I would like to break this expectation early on instead of having it apparently work well but with subpar performance/understanding of the tools. Any expectation of ordering, unity and sequentiality should be addressed. For example, I have also seen folks using flow to map over a list of 10 elements with very basic computations expecting to see improvements. All of those "intuitions" are wrong and they need to be broken. Better docs on those cases may help too. |
4c74352 talks about batch size right on the second paragraph now. |
I agree on the docs, and I'm glad to see the defaults mentioned further up. The broader point is that the distribution of usefulness over the set of feasible numbers here has a distinct mode at 1, which isn't true of any other number. 500 is not marginally much more useful than 499 or 501. There are plenty of cases however where 1 is more useful than 2, and wildly more useful than 500. I'm happy to recognize that there are fundamental differences WRT how Flow and GenStage manage data, and one such difference is that they operate on batches. The problem is that the currently chosen batch sizes amount to a built in optimization for only a certain set of problems, and I'm not sure why we should optimize those problems over others. That last argument could be levied against choosing |
The main purpose of having the default of 1000 is not to be some silver bullet. I am fine with changing the value to 10 or 100. However, I agree 10 or 100 won't be much better or worse than 1000. But that's my point: the value of "more than 1" is there to show there is batching. Choosing a default of 1 would completely undermine it. If developers are asking questions, that's a good thing, as long as they are being answered. The only other option I could think is to have no default but I am not sure if it would solve anything. |
When I first started to use Before Perhaps I was just tired or slow to digest the |
Oh, that's great feedback. I will take note! :D |
@benwilson512 so should we stick with 1000 after all? |
Sorry for waking up an old ticket. Feel free to close it if it's not the right venue or if I should start a new one. We had the same issue with the demand (though not with Flow). Our current design is 1 chain of Why would one want a single From my point of view, it makes it easier to reason and handle errors when they happen. Now granted, I am pretty sure I am "thinking" wrong here or missed something vital. Just want to make sure of that before we proceed with this. |
I think the default demand should be one, or there should be no default at all.
Premises
Issues with current defaults:
Issues with the proposal of 1, and responses.
Issues with any default other than 1:
The text was updated successfully, but these errors were encountered: