SpreadProtocol » History » Version 8

« Previous - Version 8/21 (diff) - Next » - Current version
J. Moringen, 05/01/2011 11:37 PM
added super scopes examples


SpreadProtocol

This wiki page describes the protocol used by the spread-based connectors.

Data Format

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.

Sequencing

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.

Spread Settings

Hierarchical Bus

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).

Example

super-scopes(/foo/bar/, include-self? = yes) = /, /foo/, /foo/bar/

Group Names

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.

Example

/foo/bar/ -> "1c184f3891344400380281315d9e738\0" 

Quality of Service

The following table explains how the 2D RSB QoS settings are mapped to spread message types.

UNRELIABLE RELIABLE
UNORDERED UNRELIABLE_MESS RELIABLE_MESS
ORDERED FIFO_MESS FIFO_MESS