Will the notifications still reach users when your app browser tab/window is closed? If yes, you need to use PWA push notifications instead of websocket.
On Sat, 13 Apr 2019, 22:35 , <9co...@gmail.com> wrote: > I have a social network app and users can add posts and other users can > comment posts. I need to send a notification to the author of a post and to > the other users who commented on this post. Something similar to FB > notifications: > > - > > <user x> commented your post > - > > <user y> commented post that you also commented > > > How can I compare this with available examples of chat-apps? Could someone > draw a diagram of how to spin everything together / how the whole flow > should looks like? Consumers, JS, views etc. > > I need something a'la real-time, I could create Django Rest Framework > endpoint that returns notifications to display and then in the JavaScript I > could make a request every 1-5 seconds to check if there is something new > to display but it seems that it is not optimal. That's why I'm considering > web sockets. > > -- > 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/aeb63e3c-cfa2-415d-8a3d-1f0aed40c94f%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/aeb63e3c-cfa2-415d-8a3d-1f0aed40c94f%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/CAN7EoAaoLYNr082EALT0YPzkqBymNPy1eO%3DJyiPQzK0RuToPHQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.