SpreadProtocol » History » Version 14
J. Moringen, 05/23/2011 09:52 PM
mention max. fragment size
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 | 11 | J. Wienke | Data exchanged on spread is encoded using Google protocol buffers. A spread message always contains a notification (source:/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 | 12 | J. Moringen | 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. In this case the multiple Notification objects are constructed according to the following rules: |
12 | 14 | J. Moringen | * The size of individual fragments (i.e. the values of @Attachment.binary@) must not exceed 100.000 octets |
13 | 12 | J. Moringen | * Most field values are repeated in all Notifications, in particular: |
14 | 12 | J. Moringen | ** The id of the event (@id@ field) |
15 | 12 | J. Moringen | ** The number of Notifications into which the event has been split (@num_data_parts@ field) |
16 | 12 | J. Moringen | * The two fields which differ among Notifications for one event are: |
17 | 12 | J. Moringen | ** The index of the data chunk encoded in the Notification (@data_part@ field). |
18 | 12 | J. Moringen | ** The user data (@binary@ field of the @Attachment@ object) are split. |
19 | 2 | J. Wienke | |
20 | 13 | J. Moringen | h2. Hierarchical Bus |
21 | 2 | J. Wienke | |
22 | 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). |
23 | 8 | J. Moringen | |
24 | 8 | J. Moringen | _Example_ |
25 | 8 | J. Moringen | <pre> |
26 | 1 | J. Wienke | super-scopes(/foo/bar/, include-self? = yes) = /, /foo/, /foo/bar/ |
27 | 8 | J. Moringen | </pre> |
28 | 2 | J. Wienke | |
29 | 13 | J. Moringen | h2. Group Names |
30 | 3 | J. Wienke | |
31 | 10 | J. Moringen | Group names are created by applying the following steps to the fully formal scope string representation (*including trailing slash*): |
32 | 10 | J. Moringen | # Hash the scope string using "MD5":http://en.wikipedia.org/wiki/MD5. |
33 | 10 | J. Moringen | # Convert the 16 bytes of output to a 32 character string by concatenating the *zero-padded* hex (base-16) representations of the individual bytes. |
34 | 10 | J. Moringen | Letters of the hex representation have to be lower case. |
35 | 10 | J. Moringen | # Remove the final character of the hex representation of the hash. |
36 | 10 | J. Moringen | (Since spread group names can only be 32 bytes long _including the 0-terminator_) |
37 | 7 | J. Moringen | |
38 | 7 | J. Moringen | _Example_ |
39 | 7 | J. Moringen | <pre> |
40 | 9 | J. Moringen | / -> "6666cd76f96956469e7be39d750cc7d\0" |
41 | 1 | J. Wienke | /foo/ -> "4f87be8f6e593d167f5fd1ab238cfc2\0" |
42 | 9 | J. Moringen | /foo/bar/ -> "1c184f3891344400380281315d9e738\0" |
43 | 7 | J. Moringen | </pre> |
44 | 4 | J. Wienke | |
45 | 13 | J. Moringen | h2. Quality of Service |
46 | 4 | J. Wienke | |
47 | 4 | J. Wienke | The following table explains how the 2D RSB QoS settings are mapped to spread message types. |
48 | 4 | J. Wienke | |
49 | 5 | J. Wienke | ||_.UNRELIABLE|_.RELIABLE| |
50 | 5 | J. Wienke | |_.UNORDERED|UNRELIABLE_MESS|RELIABLE_MESS| |
51 | 5 | J. Wienke | |_.ORDERED|FIFO_MESS|FIFO_MESS| |