-
Notifications
You must be signed in to change notification settings - Fork 18
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
some producer ops using the new send operation with batches #825
Conversation
* concurrency and producer batching, and also simplicity of usage. Fails if | ||
* any individual send or ack fails. | ||
*/ | ||
def sendBatch[G[_]: Traverse]( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth requiring that G
have a NonEmptyTraverse
? I think that'd allow the constraint on F
below to be a FlatMap
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL NonEmptyTraverse
, had no idea. That does indeed work for sendBatch
, the problem is down below there is no NonEmptyTraverse[Chunk]
in fs2. Maybe we could impl one, not sure what that takes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we ditch the chunk-related stuff. It seemed cool, but no idea if it's useful in practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chunk
does have a toNel: Option[NonEmptyList[O]]
that could be useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
590ffc2 shows one option: a parallel series of NonEmpty
operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or 3253892 shows one way to use Chunk
with NonEmptyTraverse
.
Does this want picking up and finishing off? |
Turns out I can't add to this branch (presumably because it's Zach's) so I've continued here: #906 |
No description provided.