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

Request and response concurrent in blaze-client #2184

Merged
merged 1 commit into from Oct 19, 2018

Conversation

Projects
None yet
2 participants
@rossabaker
Member

rossabaker commented Oct 18, 2018

Start receiving the response concurrently with rendering the request. Many responses can be generated without consuming the body in its entirety, so there's no need to finish the write before trying to read.

@rossabaker rossabaker requested a review from ChristopherDavenport Oct 18, 2018

Show resolved Hide resolved blaze-client/src/test/scala/org/http4s/client/blaze/BlazeClientSpec.scala Outdated
val server =
serverWithLocalAddress[IO](
new InetSocketAddress(hostname, 0),
maxQueued = 10,

This comment has been minimized.

@rossabaker

rossabaker Oct 18, 2018

Member

I don't see where this parameter is used in the fs2 code.

@rossabaker rossabaker force-pushed the rossabaker:blaze-client-buffering branch from 3e335c3 to 7a8257f Oct 19, 2018

@rossabaker rossabaker added this to the 0.19.1 milestone Oct 19, 2018

@rossabaker rossabaker changed the title from Write request concurrently with reading response in blaze-client to Request and response concurrent in blaze-client Oct 19, 2018

@rossabaker

This comment has been minimized.

Member

rossabaker commented Oct 19, 2018

@lbialy: This will allow the blaze-client to process a response before sending the entire request, and #2190 will give you greater control over how much is buffered before the server reads it via withSocketSendBufferSize.

@rossabaker rossabaker merged commit 4b61be6 into http4s:master Oct 19, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rossabaker rossabaker deleted the rossabaker:blaze-client-buffering branch Oct 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment