Skip to content
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

Simplify HTTP pipelining implementation #2623

Merged
merged 3 commits into from
Dec 26, 2017

Conversation

pfreixes
Copy link
Contributor

What do these changes do?

HTTP pipelining is still supported but implemented
as a simple FIFO queue with just 1 Asyncio task attending
it. It might allow optimizing infrastructures based on microservices
that do not use HTTP pipelining.

Are there changes in behavior for the user?

No

Related issue number

#2109

HTTP pipelining is still supported but implemented
as a simple FIFO queue with just 1 asyncio task attending
it. It might allow optimize infrastructures based on microservices
that do not use HTTP pipelining
Copy link
Member

@fafhrd91 fafhrd91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think with this change we don't really need StreamWriter class anymore.

@codecov-io
Copy link

codecov-io commented Dec 25, 2017

Codecov Report

Merging #2623 into master will increase coverage by <.01%.
The diff coverage is 88.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2623      +/-   ##
==========================================
+ Coverage   97.91%   97.92%   +<.01%     
==========================================
  Files          38       38              
  Lines        7331     7265      -66     
  Branches     1275     1259      -16     
==========================================
- Hits         7178     7114      -64     
+ Misses         49       47       -2     
  Partials      104      104
Impacted Files Coverage Δ
aiohttp/web_fileresponse.py 97.88% <100%> (ø) ⬆️
aiohttp/http_writer.py 99.22% <100%> (-0.21%) ⬇️
aiohttp/web_protocol.py 89.34% <86.66%> (-0.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c158d3d...2e07833. Read the comment docs.

@pfreixes
Copy link
Contributor Author

@fafhrd91 my idea was working on getting rid of some of the layers in a separated PR once it gets merged, just for simplicity and make easier the reviewing process. But, if you agree I can try to do it in the same PR.

/cc @asvetlov

@fafhrd91
Copy link
Member

it is up to you, I'd remove StreamWriter at the same time

@asvetlov
Copy link
Member

I prefer two steps: the PR is huge already.

@asvetlov asvetlov merged commit 079d8d4 into master Dec 26, 2017
@asvetlov asvetlov deleted the http_pipelinning_simple_implementation branch December 26, 2017 18:40
@asvetlov
Copy link
Member

Thanks, @pfreixes

pfreixes added a commit that referenced this pull request Jan 10, 2018
Legacy StreamWriter as a pure proxy of the transport and the protocol is
no longer needed. All of the functionalities that were behind this class
has been moved to the PayloadWriter.

Some changes that have to be considered that impacted during this change
* TCP Operations have been isolated in a module rather than move them
into the PayloadWriter
* WebSocketWriter had a dependency with the StreamWriter, to get rid of
that dependency the constructor has been modified to take the protocol
and the transport.

A next step changing the name PayLoadWriter for the StreamWriter to have
consistency with the reader part, might be considered.
asvetlov pushed a commit that referenced this pull request Jan 11, 2018
* Get rid of legacy StreamWriter (#2623)

Legacy StreamWriter as a pure proxy of the transport and the protocol is
no longer needed. All of the functionalities that were behind this class
has been moved to the PayloadWriter.

Some changes that have to be considered that impacted during this change
* TCP Operations have been isolated in a module rather than move them
into the PayloadWriter
* WebSocketWriter had a dependency with the StreamWriter, to get rid of
that dependency the constructor has been modified to take the protocol
and the transport.

A next step changing the name PayLoadWriter for the StreamWriter to have
consistency with the reader part, might be considered.

* Add CHANGES

* Fixed invalid import order

* Fix test broken

* Fix tcp_cork issues

* Test PayloadWriter properties

* Avoid return useless values for tcp_<operations>

* Increase coverage http_writer

* Increase coverage web_protocol
@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bot:chronographer:provided There is a change note present in this PR outdated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants