Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

会话推送 #1

Closed
88250 opened this issue Oct 9, 2014 · 0 comments
Closed

会话推送 #1

88250 opened this issue Oct 9, 2014 · 0 comments
Assignees
Labels
Milestone

Comments

@88250
Copy link
Contributor

88250 commented Oct 9, 2014

需求

需要精确到客户端会话(例如:设备 1、设备 2、浏览器 tab1、浏览器 tab2)进行推送。

比如一个用户可以同时登录多个客户端,有的应用场景只需要推送给其中某个客户端。

设计

session_id + @user 为 Name(key) 的方式:

  • session_iduser_id + _ + device_id(设备)/ tab_id(浏览器)
    • device_iddevice_type (iOS/Android) + - + real_device_id
    • tab_idbrowser_type + - + browser_version + - + random_num
  • 端订阅 key 改为 session_id + @user
  • 会话状态管理
  • 推送时在参数中加入会话(sessions):
    1. 给全部会话(["all"]
    2. 给指定会话(["xxx1", "xxx2"]
    3. 给激活的会话(["active"]
    4. 给非激活的会话(["inactive"]
@88250 88250 modified the milestone: 20141031 Oct 9, 2014
@88250 88250 added the feature label Oct 9, 2014
@88250 88250 self-assigned this Oct 9, 2014
@88250 88250 mentioned this issue Oct 11, 2014
88250 added a commit that referenced this issue Oct 16, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant