Will asgi become a PEP like wsgi is ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Will asgi become a PEP like wsgi is ?

Sebastian Haase-3
(sorry for cross-posting -  post should like be here rather than in django-users)
Hi,

wsgi is specified by
PEP 333 -- Python Web Server Gateway Interface v1.0

Django channels rely on asgi instead.
So far ASGI specs appear only here:

How do these two concepts compare in regards to their respect "importance" to the python community?
Especially under the consideration that real-time web applications (i.e. HTML5 websockets) is getting more and more important.

Regards,
Sebastian

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/2ee5ce83-1990-457a-b6d8-0b1db84e4b0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Will asgi become a PEP like wsgi is ?

Andrew Godwin-3
Hi Sebastian,

The proposal is certainly written like a PEP, and that is somewhat on purpose, but the scope and need for it are still a bit up in the air. In particular, ASGI currently specifies two parts:

 - An interface for talking to channel-based message queues and a set of guarantees and non-guarantees for them around delivery
 - A specification for encoding HTTP and WebSocket traffic on top of this interface as a set of messages

Given this, I would probably at a minimum want to separate the two of them out before thinking about approaching the PEP process with either part. The message queue abstraction is likely the harder one to get through as it is (deliberately) quite opinionated, but without it the other doesn't really make sense.

So, you see the quandry here, really. I just need to take the time and separate them and then start prodding people for feedback, I suspect, but anyone else on this list who has an opinion should definitely say something.

Andrew

On Sun, Mar 12, 2017 at 5:44 AM, Sebastian Haase <[hidden email]> wrote:
(sorry for cross-posting -  post should like be here rather than in django-users)
Hi,

wsgi is specified by
PEP 333 -- Python Web Server Gateway Interface v1.0

Django channels rely on asgi instead.
So far ASGI specs appear only here:

How do these two concepts compare in regards to their respect "importance" to the python community?
Especially under the consideration that real-time web applications (i.e. HTML5 websockets) is getting more and more important.

Regards,
Sebastian

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/2ee5ce83-1990-457a-b6d8-0b1db84e4b0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFwN1upsr612H0dXs6Qkjc92CFX0t_BxZ%2ByiKxOkUWmtNE%3DZFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Will asgi become a PEP like wsgi is ?

Jamesie Pic
I do not see myself using Django without Channels anymore, it's become a basic Django feature for me and I just love it. Despite my perhaps lack of knowledge about the protocol internals, such features seem like it would certainly benefit the Python community and anyway I'd say it's worth a try just to see what the python-ideas list has to say.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAC6Op1-p6O4pzUHcgZEE%2Bap8ZAdkQqeaC_bSi0%3DvF8GH%2BZBc4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Will asgi become a PEP like wsgi is ?

Etienne Robillard-6

WSGI is for building web applications in Python.

ASGI is for building platform-oriented web applications in Django.

I'm -1 on this.

I prefer the ease and flexibility of WSGI draft over asynchronous platform choices.

E


Le 2017-03-13 à 07:08, James Pic a écrit :
I do not see myself using Django without Channels anymore, it's become a basic Django feature for me and I just love it. Despite my perhaps lack of knowledge about the protocol internals, such features seem like it would certainly benefit the Python community and anyway I'd say it's worth a try just to see what the python-ideas list has to say.
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAC6Op1-p6O4pzUHcgZEE%2Bap8ZAdkQqeaC_bSi0%3DvF8GH%2BZBc4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Etienne Robillard
[hidden email]
http://www.isotopesoftware.ca/

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/827eb016-b963-b036-d054-3ed340f848c3%40yandex.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Will asgi become a PEP like wsgi is ?

Jamesie Pic
On Mon, Mar 13, 2017 at 12:26 PM, Etienne Robillard <[hidden email]> wrote:
> ASGI is for building platform-oriented web applications in Django.

Could you elaborate on this ? The only mention of Django I found in
the spec linked by the OT is "Django Channels ships with a no-op
consumer attached by default; we recommend other implementations do
the same", so it doesn't look really coupled with Django overall:
http://channels.readthedocs.io/en/stable/asgi.html

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAC6Op1_H%2BRhz-zoC_x49tYMqSQksmjdNGZwXPdLRfX4aUG0RAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Will asgi become a PEP like wsgi is ?

Etienne Robillard-6
As far I know Django channels is a Django framework enforcing a specific
messaging protocol in mind.

I don't see how implementing ASGI could help to build more scalable apps
without breaking compatibility with WSGI.

E


Le 2017-03-13 à 07:50, James Pic a écrit :
> On Mon, Mar 13, 2017 at 12:26 PM, Etienne Robillard <[hidden email]> wrote:
>> ASGI is for building platform-oriented web applications in Django.
> Could you elaborate on this ? The only mention of Django I found in
> the spec linked by the OT is "Django Channels ships with a no-op
> consumer attached by default; we recommend other implementations do
> the same", so it doesn't look really coupled with Django overall:
> http://channels.readthedocs.io/en/stable/asgi.html
>

--
Etienne Robillard
[hidden email]
http://www.isotopesoftware.ca/

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/8362a1d7-a0fa-b48a-4d48-15bdbb651c9f%40yandex.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Will asgi become a PEP like wsgi is ?

Jamesie Pic
On Mon, Mar 13, 2017 at 12:58 PM, Etienne Robillard <[hidden email]> wrote:
>
> As far I know Django channels is a Django framework enforcing a specific messaging protocol in mind.

Honnestly I thought the messaging protocol was just msgpack.

> I don't see how implementing ASGI could help to build more scalable apps
> without breaking compatibility with WSGI.
>

I thought ASGI could sit below WSGI without breaking compatibility.

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAC6Op190DqGD2Tw3rLVEWihEY9LxALuBZsQKYhmuJDjzFkpJ9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Will asgi become a PEP like wsgi is ?

James Bennett
In reply to this post by Etienne Robillard-6
WSGI is a framework-independent protocol to allow HTTP servers to communicate with Python applications. It defines a standard API and serialization mechanism to be used by the HTTP server and the Python application in order to allow them to work together.

WSGI *only* does plain HTTP. And in fact it only does plain HTTP/1.1. It cannot handle quite a few features of HTTP/2, and provides no support whatsoever for modern bidirectional web protocols like WebSocket.

ASGI attempts to fill that gap by defining a protocol which allows these other protocols/features to communicate with Python applications. In much the same way as WSGI, it defines an API and serialization. There is nothing Django-specific about ASGI. ASGI is not coupled to Django. ASGI is just a necessary precondition for being able to build the kinds of things in Django that Channels aims to provide, in much the same way that WSGI -- or something like it -- is a necessary precondition for current request/response HTTP/1.1 Django to exist.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAL13Cg-xJtxSJ4WyQHdHRacrda9XwQcc8h6FNKr-K_B_kOSK%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Will asgi become a PEP like wsgi is ?

Andrew Godwin-3
Right, what James says here is pretty much my thoughts; it has been designed from the ground up not to be tied to Django, up to and including the fact that it's in separate packages; all the Django-specific stuff is in the "channels" package, while daphne, asgi_redis, asgiref etc. are useable by anything (I need to look into getting another framework like Flask working on top of it as a proof of concept).

My main sticking point is the design of the ASGI messaging interface, as that will be the one thing that everyone has to write against - are the number of calls we have enough? Does async support fit in alright? etc. The message formats themselves would work on anything that looks remotely similar.

Andrew

On Mon, Mar 13, 2017 at 5:17 AM, James Bennett <[hidden email]> wrote:
WSGI is a framework-independent protocol to allow HTTP servers to communicate with Python applications. It defines a standard API and serialization mechanism to be used by the HTTP server and the Python application in order to allow them to work together.

WSGI *only* does plain HTTP. And in fact it only does plain HTTP/1.1. It cannot handle quite a few features of HTTP/2, and provides no support whatsoever for modern bidirectional web protocols like WebSocket.

ASGI attempts to fill that gap by defining a protocol which allows these other protocols/features to communicate with Python applications. In much the same way as WSGI, it defines an API and serialization. There is nothing Django-specific about ASGI. ASGI is not coupled to Django. ASGI is just a necessary precondition for being able to build the kinds of things in Django that Channels aims to provide, in much the same way that WSGI -- or something like it -- is a necessary precondition for current request/response HTTP/1.1 Django to exist.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAL13Cg-xJtxSJ4WyQHdHRacrda9XwQcc8h6FNKr-K_B_kOSK%3Dg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFwN1ur01RHWbHS9aR7OQFkBqLktSeOuZwC_gYuqbroWQGii2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.