Django Websocket Implementation Request

143 views
Skip to first unread message

Confi Yobo

unread,
Aug 1, 2019, 9:09:21 AM8/1/19
to django-d...@googlegroups.com
This might be a little redundant as you would say but i see importance in it.

Django should come chipped in with websocket implementation rather developers using third party libraries like django-channels which are difficult and most at times have poor documentation. I have seen many cases where developers want to build an application that requires websocket they use another web framework.

So in my opinion and that of few other developers i'v  seen i think websocket feature should be added to django out of the box(something like socket.io would make a lot of sense).

Carlton Gibson

unread,
Aug 1, 2019, 9:22:11 AM8/1/19
to Django developers (Contributions to Django itself)
Hmmm. I guess Channel is doing more than just websockets, but I've always thought it had good docs... Anyhow...

We'll see how the Async work goes, but a lot of channel will end up being absorbed into Django itself. What, at this point, I guess that will leave is "just" the websocket bit. (Maybe the Channel Layers bit... too but maybe that would/could be separate.) Hopefully this'll make it more focused and easier to follow

But... I think websockets haven't turned out to be the One True Hammer people thought. (They're not that popular actually, it seems...) So I'm not sure we'd include support in core (vs keeping it in the third-party package.) 

I guess something to revisit after 3.0. 

Kind Regards,

Carlton

Confi Yobo

unread,
Aug 1, 2019, 3:59:01 PM8/1/19
to django-d...@googlegroups.com
Please consider it, cause the procedures of using third party websocket library (mostly for production) is cumbersome  

--
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-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/c561814d-941c-446f-8707-c2ef1ce8170e%40googlegroups.com.

Confi Yobo

unread,
Aug 1, 2019, 4:00:42 PM8/1/19
to django-d...@googlegroups.com
And socket.io kind of implementation is one thing developers from js like us are missing in django.

Andrew Godwin

unread,
Aug 1, 2019, 4:14:48 PM8/1/19
to Django developers (Contributions to Django itself)
Unfortunately, from my perspective, websocket support is tricky enough that it's at least not on the short-term plan to bake into Django; it's used by only a small fraction of our users, and the Channels project is an official Django project, so it's as close as we can get so far. Future Django versions with async support will shrink Channels down significantly, and remove the need for it to be hosted differently, but the plan is still to have it as a separate package - we may write about it in the official docs, though.

socket.io is even harder as it's fundamentally hard to scale - it needs stateful storage to aid in transferring connections, and this means it's really hard to have a single method that will work for everyone. Having "one right way to do it" is sort of a necessary prerequisite to having something in Django, and I just don't feel like it's there.

Andrew

Confi Yobo

unread,
Aug 1, 2019, 4:20:06 PM8/1/19
to django-d...@googlegroups.com
So it should not be expected in future release?

Confi Yobo

unread,
Aug 10, 2019, 12:51:25 PM8/10/19
to Django developers (Contributions to Django itself)
So it should not be expected in 3.0? @ Carlton Gibson

Carlton Gibson

unread,
Aug 10, 2019, 1:07:46 PM8/10/19
to Django developers (Contributions to Django itself)

On 10 Aug 2019, at 18:51, Confi Yobo <conf...@gmail.com> wrote:

So it should not be expected in 3.0? @ Carlton Gibson

No. As per the previous comments, it’s not something likely to be included in core. Certainly not for 3.0. 

Confi Yobo

unread,
Aug 10, 2019, 4:25:25 PM8/10/19
to django-d...@googlegroups.com
Ok

--
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-develop...@googlegroups.com.

1337 Shadow Hacker

unread,
Aug 11, 2019, 8:52:42 AM8/11/19
to django-d...@googlegroups.com
> They're not that popular actually, it seems...

They might become more popular, when they work behind proxies ... a limitation which you usually figure out after your first important client tries to connect from behind their corporate proxy, then you can implement polling again - a fallback that socket.io provides.

However, websockets are nice to have if you're using a Django library that supports data binding such as ryzom, maybe there are others but I'm not aware about them, and it doesn't implement the polling fallback so far afaik.
Reply all
Reply to author
Forward
0 new messages