Re: Multiple websocket connection vs single websocket connection when using django channels

2018-04-07 Thread Robin Lery
Yes, I guess that's how to work around per connection for a user. Thank you
for your input!

On Fri, Apr 6, 2018 at 9:49 PM, Ken Whitesell 
wrote:

> 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.
>

-- 
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/CA%2B4-nGqLx9FH9FBAbdVP_EtogctGQZPRKx0PnmETEptW-FJVOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multiple websocket connection vs single websocket connection when using django channels

2018-04-06 Thread Ken Whitesell
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.


Multiple websocket connection vs single websocket connection when using django channels

2018-04-06 Thread James Farris
I’m looking into creating an app that may utilize chat and notifications as 
well. I’m interested in what others have to say about this as well

-- 
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/f39476b5-eb31-48da-ac44-e5f53940396c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Multiple websocket connection vs single websocket connection when using django channels

2018-04-06 Thread Robin Lery
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/CA%2B4-nGotWh6waiNPdTbH85%3DM0mPPKnh1%3DHR4BdYBsrUCFB6WPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.