Re: Channels architecture for chat application and subscriptions

2017-09-22 Thread Robin Lery
Okay. Thank you. Really appreciate what you guys are building. Sincerely, Robin On Thu, Sep 21, 2017 at 1:10 AM, Andrew Godwin wrote: > Yes, you can do as you suggest, but you're also right that it will be slow > to send. Groups are more efficient in theory, but right now their send > implement

Re: Channels architecture for chat application and subscriptions

2017-09-20 Thread Andrew Godwin
Yes, you can do as you suggest, but you're also right that it will be slow to send. Groups are more efficient in theory, but right now their send implementation is also a for loop (though it's a little bit tighter) so not sure how drastic the difference will be. Andrew On Sun, Sep 17, 2017 at 10:

Re: Channels architecture for chat application and subscriptions

2017-09-17 Thread Robin Lery
Thank you, Andrew. Also, after reading more about channels in SO and channel's GitHub and also here in Django-users group

Re: Channels architecture for chat application and subscriptions

2017-09-17 Thread Andrew Godwin
Hi Robin, The most efficient way to do this is to have one WebSocket connection that all the messages are sent down. Have a Group per group-chat and per single-user chat (I would model those as a special case of the group-chat if I were you for simplicity), and when a user connects, add them to th

Channels architecture for chat application and subscriptions

2017-09-17 Thread Robin Lery
I would like to make a chat application using django and channels. I have two models to achieve a chat like application. 1. Thread - A thread can have list of users. So, it can be used for chat between two users, or groups of user. If it's a group thread, it can have a subject for the