Skip to content

Add aiohttp.web - #159

Merged
asvetlov merged 15 commits into
masterfrom
request
Oct 16, 2014
Merged

asvetlov merged 15 commits into
masterfrom
request

Conversation

@asvetlov

Copy link
Copy Markdown
Member

The basic interface for highlevel web server development.
aiohttp.web has experimental status right now.

asvetlov added a commit that referenced this pull request Oct 16, 2014
@asvetlov
asvetlov merged commit c05d764 into master Oct 16, 2014
Comment thread aiohttp/web/request.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This property returns nothing. As planned?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not finished yet but @fafhrd91 asked me to merge existing branch -- we'll publish it in new release.

@ludovic-gasc

Copy link
Copy Markdown
Contributor

If I understand this pull request, you're integrating almost all aiorest features in aiohttp.

It's a very good idea, because the new Web frameworks that will appear, based on aiohttp, will share more code base and be more interoperable between them.

Just, if you could continue to be Keep it Simple Stupid, like aiohttp, to be easily hackable by an AsyncIO dev, it will be very cool :-)

What are your plans for aiorest ? Delete aiorest ? rewrite aiorest based on this new API available in aiohttp ? Abandon aiorest ?

Comment thread aiohttp/web/request.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yocto detail: you use 'utf-8' notation in others places, but 'utf8' in this place.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy from WebOb :) I'll change it

@asvetlov

Copy link
Copy Markdown
Member Author

@GMLudo Yes, I'd like to transplant successful design decisions from aiorest to aiohttp.
The difference that aiohttp should support HTTP streaming, websockets, file uploads and other stuff important for generic web development. Or, at least, don't forbid to do what you want on top of aiohttp.web.

aiorest probably will be frozen -- we are already have all we need for making REST API.
I don't like to make backward incompatible changes to aiorest just to support aiohttp.web.
Maybe we will create new aio lib for experimenting with web server development for moving good code to aiohttp again as we does for aiorest -- don't know.

@asvetlov
asvetlov deleted the request branch October 16, 2014 20:20
@ludovic-gasc

Copy link
Copy Markdown
Contributor

@asvetlov Ok, thanks for your answer.
FYI, in our fork of aiorest, we're adding 10% missing stuff we need to spawn quickly API daemons for our usage. Our goal is to be KISS, KISS and KISS. And also, a powerful architecture to have very good performances, because we're developing a telecom cloud solution with a lot of clients on it.

For example, we replaced an old apache/php application by a solution based on our fork of aiorest, we handle a lot more requests that before.

Be assured, to avoid confusion between your aiorest and our aiorest, we will change the name of our fork.

But finally, after each will do experimentations, we could try maybe to create a synergy together around this new API, even if we have different points of view, couldn't we ?

@asvetlov

Copy link
Copy Markdown
Member Author

@GMLudo

But finally, after each will do experimentations, we could try maybe to create a synergy together around this new API, even if we have different points of view, couldn't we ?

Sounds good.

@ludovic-gasc

Copy link
Copy Markdown
Contributor

@asvetlov sounds also good for me. Don't hesitate to contact me when you have something to show, I will test.

@ludovic-gasc

Copy link
Copy Markdown
Contributor

Hi @asvetlov,

I'm permit to contact you in this PR, because we've announced during PyCON-FR the official release of API-Hour, the fork of aiorest: https://github.com/Eyepea/API-Hour#api-hour

The slides of my presentation: https://github.com/Eyepea/API-Hour/tree/master/propaganda/en

For now, we're stabilizing API-Hour.
Do you have an idea when aiohttp.web will be enough mature to be used in API-Hour ?

Regards.

@asvetlov

Copy link
Copy Markdown
Member Author

I think for now aiohttp.web is ready except documentation.
I'll try to finish documenting route and exceptions part this weekend and publish new release.

@fafhrd91

Copy link
Copy Markdown
Member

lets wait with new release. i'd like to migrate one of our services to it first.

@asvetlov

Copy link
Copy Markdown
Member Author

ok. @fafhrd91 when you have a chance to try?

I decided to postpone gzip processing (as well as CORS) to next release.
Maybe better to implement such features as Middlewares/OutputChain/Tweens -- we need investigation first.
Other stuffs like url reverse routing is not required for first aiohttp.web release also.

@fafhrd91

Copy link
Copy Markdown
Member

ok on postpone features.

i'll try to do that during this weekend.

@ludovic-gasc

Copy link
Copy Markdown
Contributor

+1 for CORS, but should be optional, because it's not necessary with classical Web.

About gzip compression, it isn't my time, you do what you want, but for me, it isn't necessary:

during development, you want to use wireshark to analyse problems, gzip is a more a problem.

On production, in my architecture, I use HAproxy behind my aiohttp/API-Hour daemons.
HAproxy handle TLS and gzip compression, I have better performances with that.

Is somebody use aiohttp as server directly connected on Internet in a production environment?

@fafhrd91

Copy link
Copy Markdown
Member

i use it in production

@ludovic-gasc

Copy link
Copy Markdown
Contributor

Ok. Then gzip compression is useful in aiohttp.web.

@lock

lock Bot commented Oct 30, 2019

Copy link
Copy Markdown

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.

@lock lock Bot added the outdated label Oct 30, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Oct 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants