Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The idea is to enable bulk operations via a core async channel and have throttling built in. Throttling would be either by max number of chunks to be sent or timeout ("send bulk request if payload has at least X chunks or if 1min passed since last bulk request") . The internals should take advantage of the fact that the underlying java client allows us to do this stuff asynchronously, but we must still allow the user to control parallelism, flow and handle back-pressure. We must also allow the user to plug reporting/retries of bulk operations.
This is just a draft, the implementation is open to discussion/changes.
The docstring should be quite self-explanatory.
One caveat currently is that if the jvm crashes you can lose pending jobs. In theory it's possible for the end user to plug a durable store based solution to handle restarts by inspecting :input :ouput chans (only purging job from hard storage if it passed the output chan), but this might (or not) be something we could implement.