You can indeed use Channels as the backbone of a notifications system using WebSockets, but you'll need to overlay your own state logic on top (notably, "what has already been sent to the client?") You can also in theory use Channels 1 to do long-polling, but this is likely going to make a lot more sense once Channels 2 is out and you can write native async HTTP handlers.
Given that not all browsers or corporate networks support WebSockets, I would suggest you first build an AJAX short-polling based solution for maximum compatability (but it's going to strain your servers as more people use it), then add in either long-polling, WebSockets or both as options based on what gives you the best return in terms of UX and development time. Andrew On Sun, Nov 19, 2017 at 4:41 AM, Rajesh Yogeshwar < rajesh.yogesh...@gmail.com> wrote: > I have a SAAS application built using django. I want to now add real time > notifications to my application. Everywhere I have looked one of the top > suggestions is to use channels. But what I would like get to know is > > - Would it be an overkill to use channels only for notifications > purpose? > - How scalable and future proof is it? > > I have also failed to find a single example that would demonstrate use of > channels for notifications purpose. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/92674051-953c-4176-9ef9-05059b3be0a0%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/92674051-953c-4176-9ef9-05059b3be0a0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFwN1uo1oEOrwDT7iP%2BEF1BtjJjoNgr4xpJAMMrzaJezB%3D2FGg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.