Sfoglia il codice sorgente

update guid section

Feng 10 anni fa
parent
commit
9ed5d4fb86
1 ha cambiato i file con 10 aggiunte e 17 eliminazioni
  1. 10 17
      docs/source/design.rst

+ 10 - 17
docs/source/design.rst

@@ -31,28 +31,22 @@ Design Philosophy
 System Layers
 -------------
 
-1. Connection Layer:
+1. Connection Layer
    
    Handle TCP and WebSocket connections, encode/decode MQTT packets.
 
-2. Session Layer:
+2. Session Layer
    
    Process MQTT PUBLISH/SUBSCRIBE Packets received from client, and deliver MQTT messages to client.
    
-3. PubSub Layer:
+3. PubSub Layer
    
    Dispatch MQTT messages to subscribers in a node.
-   
-4. Routing(Distributed) Layer:
+
+4. Routing(Distributed) Layer
    
    Route MQTT messages between clustered nodes.
 
-.. code::
-
-               --------------     -----------     ----------     ----------     
-    Client --> | Connection | --> | Session | --> | PubSub | --> | Router |
-               --------------     -----------     ----------     ----------
-
 ----------------
 Connection Layer
 ----------------
@@ -132,13 +126,12 @@ PacketId and MessageId
 
 The 16bits PacketId is defined by MQTT Protocol Specification, used by client/server to PUBLISH/PUBACK packets. A GUID(128bits globally unique Id) will be generated by the broker and assigned to a MQTT message.
 
-Format of the globally unique message id:
+Format of the globally unique message id::
 
-+------------------------+----------------+------------+
-|        Timestamp       |  NodeID + PID  |  Sequence  |
-+------------------------+----------------+------------+
-| <-------64bits-------> | <---48bits---> | <-16bits-> |
-+------------------------+----------------+------------+
+    --------------------------------------------------------
+    |        Timestamp       |  NodeID + PID  |  Sequence  |
+    |<------- 64bits ------->|<--- 48bits --->|<- 16bits ->|
+    --------------------------------------------------------
 
 1. Timestamp: erlang:system_time if Erlang >= R18, otherwise os:timestamp
 2. NodeId:    encode node() to 2 bytes integer