SpreadProtocol » History » Version 9

J. Moringen, 05/01/2011 11:38 PM
extended hashing example

1 1 J. Wienke
h1. SpreadProtocol
2 1 J. Wienke
3 1 J. Wienke
This wiki page describes the protocol used by the spread-based connectors.
4 1 J. Wienke
5 1 J. Wienke
h2. Data Format
6 1 J. Wienke
7 1 J. Wienke
Data exchanged on spread is encoded using Google protocol buffers. A spread message always contains a notification (browser:/trunk/RSBProtocol/rsbprotocol/Notification.proto) as elementary communication unit. Descriptions of the Notification contents are given as comments on the descriptor file.
8 1 J. Wienke
9 1 J. Wienke
h2. Sequencing
10 1 J. Wienke
11 1 J. Wienke
Because spread has a message size limit, a single Notification may not be sufficient to transport a whole event with a huge amount of user data. Hence, events may be encoded in several notification sent subsequently. The meta infos are the same in all Notifications whereas the user data are split. The number of Notifications for one event as well as the current index of the sent data chunk are encoded in the Notification.
12 2 J. Wienke
13 2 J. Wienke
h2. Spread Settings
14 2 J. Wienke
15 2 J. Wienke
h3. Hierarchical Bus
16 2 J. Wienke
17 8 J. Moringen
The hierarchical bus is created by sending each message to a group corresponding to its scope as well as groups corresponding to all super scopes including "/" (multigroup mulitcast).
18 8 J. Moringen
19 8 J. Moringen
_Example_
20 8 J. Moringen
<pre>
21 8 J. Moringen
super-scopes(/foo/bar/, include-self? = yes) = /, /foo/, /foo/bar/
22 8 J. Moringen
</pre>
23 2 J. Wienke
24 2 J. Wienke
h3. Group Names
25 3 J. Wienke
26 7 J. Moringen
Group names are created by hashing the fully formal scope string representation (*including trailing slash*) using md5. Because spread group names can only be 32 bytes long _including the 0-terminator_, the last character of the hex representation of the hash has to be omitted. Letters of the hex representation have to be lower case.
27 7 J. Moringen
28 7 J. Moringen
_Example_
29 7 J. Moringen
<pre>
30 9 J. Moringen
/         -> "6666cd76f96956469e7be39d750cc7d\0"
31 9 J. Moringen
/foo/     -> "4f87be8f6e593d167f5fd1ab238cfc2\0"
32 7 J. Moringen
/foo/bar/ -> "1c184f3891344400380281315d9e738\0"
33 7 J. Moringen
</pre>
34 4 J. Wienke
35 4 J. Wienke
h3. Quality of Service
36 4 J. Wienke
37 4 J. Wienke
The following table explains how the 2D RSB QoS settings are mapped to spread message types.
38 4 J. Wienke
39 5 J. Wienke
||_.UNRELIABLE|_.RELIABLE|
40 5 J. Wienke
|_.UNORDERED|UNRELIABLE_MESS|RELIABLE_MESS|
41 5 J. Wienke
|_.ORDERED|FIFO_MESS|FIFO_MESS|