Luis,

I think what Alex and Aymeric are saying is that "websockets" (I use
quotes to show that I mean not only the material outlined in RFC 6455
but also the general process of handling bytes-on-the-wire when
'pushing' data to the 'client') are ideally not part of the problem
that Django (and WSGI applications generally) are trying to solve.
Correct me if I'm wrong, gentlemen.

Alex and Aymeric gave really stellar talks on this topic, at PyCon.us
2010 and Djangocon.us 2013 respectively, and they're really worth
going back and watching.  Of course Aymeric also maintains a websocket
library (https://github.com/aaugustin/websockets).

At the end of the day, handling bytes-on-the-wire is really fun when
done on a different layer than your web MVC application.  Colin
mentioned Hendrix - a Twisted container for Django.  Instead of trying
to "do async" inside of WSIG, Hendrix (and some other WSGI containers)
allow you to run other python applications alongside your WSGI
application.

For example, I have a project called Cirque that uses Hendrix to both
serve a WSGI application (Django) and listen for mesh network traffic
on a UDP port.  It reports mesh traffic to the Django application and
communicates directly with the websockets opened on the
Django-delivered resources.

This way, Django doesn't even need to realize that anything "async" is
happening.

It is also definitely worth paying attention to the web-sig mailing
list.  As you can see, October has been mostly talk of what we want in
the next WSGI 
(https://mail.python.org/pipermail/web-sig/2014-October/thread.html).

This post is starting to grow beyond the django-dev topic.  If you
want to know more about the how's and why's, feel free to post in
django-users.  As far as django development, there seems to be no
compelling argument, at least so far, to change Django's disposition
to make it "async."

On Wed, Oct 29, 2014 at 9:38 AM, Alex Gaynor <alex.gay...@gmail.com> wrote:
> And after you throw away the ORM, you have to throw away every other library
> that does blocking IO (anything in the stdlib, memcached, redis, requests,
> etc.). There are absolutely no affordances in WSGI for use with non-blocking
> libraries like asyncio or Twisted.
>
> Alex
>
>
> On Wed Oct 29 2014 at 1:45:59 AM Aymeric Augustin
> <aymeric.augustin.2...@polytechnique.org> wrote:
>>
>> Then the first step is to throw away the ORM.
>>
>> See my talk at DjangoCon US 2013 for details.
>>
>> --
>> Aymeric.
>>
>> Le 28 oct. 2014 à 23:36, Marco Paolini <markopaol...@gmail.com> a écrit :
>>
>> What if we do it with asyncio?
>>
>> 2014-10-28 22:47 GMT+01:00 Aymeric Augustin
>> <aymeric.augus...@polytechnique.org>:
>>>
>>> No, there isn’t.
>>>
>>> I assume that “including in core” means at least “making usable in
>>> combination with WSGI and with the ORM”.
>>>
>>> Even if we disregard for a minute the fact that WSGI is incompatible with
>>> websockets, the ORM is a hard problem, because current solutions involve
>>> either (a) threads — not particularly scalable or (b) gevent — not
>>> particularly reliable.
>>>
>>> --
>>> Aymeric.
>>>
>>>
>>>
>>> On 28 oct. 2014, at 22:06, Luis Masuelli <luisfmasue...@gmail.com> wrote:
>>>
>>> Is there any current development involving including websockets in django
>>> core?
>>>
>>> --
>>> 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 django-developers+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-developers@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-developers.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-developers/50768d16-1d05-489c-8cbf-2091d95ff388%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 django-developers+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-developers@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-developers.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-developers/7D3898D4-50F7-4ACE-A081-0ACC9D824191%40polytechnique.org.
>>>
>>> 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 django-developers+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-developers@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/CAEbA68mnak1zdeAjTXM-Qfbz9mm%2B07qhfxZPCJPDfLFqHtcgpg%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 django-developers+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-developers@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/EEDD3BFA-B071-4FC4-93C7-0994E073D93B%40polytechnique.org.
>> 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 django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAFRnB2USMMbCp4r58J2zhf9HXpCAtiPYQ6UfgR%3D8Eiy%2BvC-d9w%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Peace and Persistence
jMyles

-- 
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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMGywB4138GUzXv3RHMcMNa6e9g42BeHUm10yAWeNu2qnwRV4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to