Hi Robin, I can't speak to any generalized situations, or what might be considered "best practices" or most optimal.
What I can say is that we have gone with the single websocket connection for each client - whether it's a real person at a browser or an application. All our communications through the channel are JSON objects, and we include a key named "app" in the object which identifies the specific "feature" or "application" to which a message is directed. It's done in both directions - submissions through the channel from the browsers to the server and from the server to the browser all have that key in the JSON. About the most I can say is that it works well for us. Ken On Friday, April 6, 2018 at 5:10:41 AM UTC-4, Robin Lery wrote: > > Hi, > > Suppose an application has features like Chat, Notification and Activity > feeds. > > I would like to know whether its recommended to have different websocket > connection for different feautues for each user. Meaning for chat purpose > a separate socket connection, for notification another separate connection? > > Or is it better to have only one websocket connection for a user, and work > around that single connection for different features? > > Sincerely, > Robin > -- 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/0bf0d083-1bb3-4963-905c-9e8bfce6c765%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.