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

ASGI+HTTP Support #1358

Closed
kgriffs opened this issue Oct 1, 2018 · 11 comments
Closed

ASGI+HTTP Support #1358

kgriffs opened this issue Oct 1, 2018 · 11 comments
Assignees
Milestone

Comments

@kgriffs
Copy link
Member

kgriffs commented Oct 1, 2018

This will need to work with middleware, hooks, error handlers, media handlers, etc.

https://asgi.readthedocs.io/en/latest/specs/www.html

See also: #1055

@kgriffs kgriffs self-assigned this Oct 1, 2018
@kgriffs kgriffs added this to the Version 2.0 milestone Oct 1, 2018
@kgriffs
Copy link
Member Author

kgriffs commented Oct 1, 2018

I will take this one.

@nmcbride
Copy link

nmcbride commented Jan 15, 2019

Hey there @kgriffs,

I was wondering what you thought the timeline on this would be? I have a project where I am going to use websockets for real-time collaboration. I'm not trying to rush you or anything like that; I know this release will include big changes. I'm currently writing the core api in falcon and trying to decide if I should use Sanic or something else as a microservice specifically for the web socket stuff just so I have a way ahead.

Thanks for taking the time to respond.

Nate

@kgriffs
Copy link
Member Author

kgriffs commented Apr 9, 2019

Hi, sorry for the delayed response. We decided to focus on shipping 2.0 first (RC1 is currently available on PyPI) so that we could drop Python 2.7 and 3.4 support in 3.0 and do a cleaner ASGI implementation.

3.0 development just opened on the master branch and we anticipate this milestone cycle to be significantly shorter than 2.0 (i.e., 4-5 months instead of 12-14 months), with the primary focus being on ASGI and improved form data parsing. We'll be sprinting on the 3.0 milestone at PyCon US so stay tuned!

You can see what is currently planned here: https://github.com/falconry/falcon/milestone/33

@julioasotodv
Copy link

+1 for this. If Falcon supported natively Async requests using ASGI, it would become my go-to framework for almost everything web-related.

@kgriffs
Copy link
Member Author

kgriffs commented Jun 12, 2019

Hi, for those interested, here is a gist demonstrated the proposed interface. Feedback is welcome. In the meantime, I'm prototyping the implementation and should have some code to share soon.

https://gist.github.com/kgriffs/4f99da6dde2266201ddddc42784e5aee

@ghost
Copy link

ghost commented Jul 23, 2019

+1. Same as @julioasotodv.

@julioasotodv
Copy link

@kgriffs I have just looked at your gist. I really like the style: very clean and “asyncionic” (I believe that word does not exist).

With an implementation like that, I would really never look back to aiohttp 😊

@kgriffs
Copy link
Member Author

kgriffs commented Oct 6, 2019

OK everyone, please take a look at #1573

@kgriffs
Copy link
Member Author

kgriffs commented Oct 6, 2019

Note that falcon.testing has been updated to handle ASGI. The event loop is handled behind the scenes to make it a lot easier for app developers to write their functional test cases.

@kgriffs
Copy link
Member Author

kgriffs commented Feb 6, 2020

FWIW, we've been tracking progress here: https://gist.github.com/kgriffs/a719c84aa33069d8dcf98b925135da39

kgriffs added a commit that referenced this issue Feb 15, 2020
kgriffs added a commit to kgriffs/falcon that referenced this issue Feb 15, 2020
kgriffs added a commit that referenced this issue Feb 15, 2020
kgriffs added a commit that referenced this issue Apr 8, 2020
* refactor(requrest): avoid duplication of prefix, add get_media to wsgi method

* refactor(response): add render_body to wsgi response.

Also unify data and media behavior between asgi and wsgi

* test(response): additional tests to render_body

* docs: add newsfragment

* docs: fix typo in changelog

* doc(falcon.Response): Expand news fragment for render_body()

* doc(Response): Update docstrings for render_body()

* doc(Response): Update docstrings for media and get_body()

* doc(Request): Add news fragment re get_media()

Fixes #1679
Partially-Implements #1358

Co-authored-by: Vytautas Liuolia <vytautas.liuolia@gmail.com>
Co-authored-by: Kurt Griffiths <mail@kgriffs.com>
@kgriffs
Copy link
Member Author

kgriffs commented Dec 13, 2020

Completed.

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

No branches or pull requests

4 participants