Implement large file streaming for proxy GET #30
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.
This introduces another StreamingOutput implementation that wraps a Buffer response coming from Mutiny when we proxy a GET request for a file. This enables us to avoid buffering the whole file in memory when transferring back to the client. This is based on work in Commonjava/gateway.
This code has NOT been tested for performance, to ensure that the memory usage problems are fixed. We need to performance test this, probably with a profiler on localhost or similar at a minimum, to ensure heap memory doesn't spike when a really large file is proxied.
NOTE: This is a backport of the attempt to implement file streaming on the archive-enabled version of this service. I've cut out digest handling and tracking record setup to make it work in the older codebase. It's based on commit: 989c6c1.