enjoy coding

we may not make events,but when we try,we learn.

Note of Mqtt Protocol

| Comments

blog

1
2
- [SSL/TLS配置(证书生成需要注意CN不能乱填)][1]
- [mqtt协议详解][2]

JPush参考发现的一些点:

1
2
3
4
5
6
- 推送信息的保存时间长短(10天?)
- 单设备多用户
    - server端记录设备的id,多用户通过别名其它机制来做逻辑的映射
    - 但极光的做法是单个设备和别名一对一,不同用户登录,别名会被覆盖
    - 提供有限时长过的记录保存
- [极光推送的很多策略值得参考,API设计的也不错][3]

rabbitmqtt插件形式:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
     ------------------------
     |  mqtt_sup        |  (supervisor)
      ------------------------
        /                    \
       /                      \
      /                        \
     /                          \
-------------------------------------\
|  rabbitmq_mqtt_collector|\
 ------------------------------------- \
   (worker)                      \----------------------------------
                                      | rabbit_mqtt_client_sup|
                                      -----------------------------------
                                              (supervisor)
                                                   |
                                                   |
                                                   |
                                              -------------------------------------------
                                              | rabbit_mqtt_connection_sup|
                                               ------------------------------------------
                                                   (supervisor)
                                         /    /  \                                        \
                                        /    /    \                                        \
                                       /    /      \                                        \
                                                   -----------------------------          -------------------------------
                                                   | rabbit_mqtt_reader|         | keepalive_supervisor|
                                                    ----------------------------          --------------------------------

协议原理图

protocol img

Comments