Falcon: ASGI+HTTP Support

Created on 1 Oct 2018  ·  11Comments  ·  Source: falconry/falcon

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

enhancement

Most helpful comment

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

All 11 comments

I will take this one.

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

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

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

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

+1. Same as @julioasotodv.

@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 😊

OK everyone, please take a look at #1573

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.

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

Completed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kgriffs picture kgriffs  ·  5Comments

bachrc picture bachrc  ·  3Comments

codenoid picture codenoid  ·  4Comments

bootrino picture bootrino  ·  3Comments

coffeedoughnuts picture coffeedoughnuts  ·  8Comments