How do I create Private channel between two user

2019-05-21 23:53发布

I have been implementing Faye server for chat application. Currently we have 400000 users in our table. Each user can chat with one another privately. But I don’t know how to implement private channel between two users using Faye or private pub for 4 lakhs user. Do I have to make a table which will contain around 4 lakhs X 4 lakhs private channel entry, I think that is not a good idea. please guide me.

1条回答
别忘想泡老子
2楼-- · 2019-05-22 00:17

The Faye documentation provides some very good information on this subject: http://faye.jcoglan.com/security.html

In your case the How should I authenticate clients? is particularly relevant.

The users who are to participate in the private one-to-one chat subscribe to a channel and your application controls who can subscribe to that channel using the authentication techniques mentioned - it only allows the two expected users to participate.

查看更多
登录 后发表回答