6 RMCast is a reliable source-ordered multicast protocol implementation
7 for message-oriented multi-sender group communication built on top of
8 IPv4 multicast. It uses sequence numbers for re-ordering, duplicate
9 suppression and loss detection. Negative acknowledgments (NAK) with
10 retransmissions are used to recover from losses.
12 One new and interesting idea implemented in this protocol is history
13 transmission (dubbed negative retransmission). In a nutshell, each
14 sender, along with normal payload, transmits a list of other sender's
15 IDs along with sequence numbers of last messages received from those
16 senders by this member. This, in some sense, builds a pyramid of
17 information: each subsequent message carries some information for a
18 number of previous messages (from other senders). This helps other
19 receivers detect losses.
21 The protocol does not track group membership. Messages are retained
22 for retransmission for a predefined amount of time. The "last message
23 or lost message" dilemma is solved by periodic history transmissions
24 in cases when there is no useful traffic (idle network).
30 There is a simple example available in examples/RMCast/Send_Msg with
31 the corresponding README file.
37 Over-the-wire representation is little-endian CDR. The protocol is
38 message-based with information encapsulated into one or multiple
39 profiles (Protocol.h):
45 u16 id; // Profile id.
46 u16 size; // Profile size.
51 u32 size; // Total size of the message.
52 sequence<Profile> profiles; // Sequence of profiles.
57 The following profiles are defined (Protocol.h):
63 u32 addr; // IPv4 address.
67 The 'From' profile appears in each message. It is never transmitted
68 over the wire. Instead the 'Link' layer (see below) adds it.
74 u32 addr; // IPv4 address.
78 The 'To' profile also appears in each message. It is also never
79 transmitted over the wire since all communications are done via
80 well-known group address. It is added by the 'Link' layer and is used
81 by a group member to identify messages from itself ('From' == 'To').
90 The 'Data' profile is used to transmit user payload.
99 The 'SN' profile carries sequence number for 'Data' and 'NoData' profiles.
105 u32 addr; // IPv4 address.
111 The 'NAK' profile carries sequence numbers of all the messages originated
112 from the member identified by addr:port that the receiver detected were
121 u32 addr; // IPv4 address.
130 The 'NRTM' profile carries highest sequence numbers known to this member
131 for (some sub-) set of members. It is used by other members to detect loses.
132 This profile is normally combined with 'Data' transmission.
136 struct NoData: Profile
140 The 'NoData' profile is send in reply to 'NAK' when the lost message is
145 Below is the list of actions that trigger messages with various
149 user calls send(): SN
156 received NAK: SN or SN
164 This section describes high-level architecture of the implementation.
165 The protocol is implemented as a stack (Stack.h) of the following
173 The 'Socket' element is the user interface of the member. When a user
174 calls send() 'Socket' creates a new message with 'SN' and 'Data' profiles
175 and forwards it to the 'Acknowledge' element. It also receives (from
176 'Acknowledge') and queues incoming messages that are delivered to the user
177 when recv() is called.
179 The 'Acknowledge' element is responsible for re-ordering, duplicate
180 suppression, loss detection and negative acknowledgments. It maintains a
181 dynamically changing "window" (which slides toward higher sequence
182 numbers) of received messages. Messages that arrive out of order are held
183 in this window. Presence of a hole in the windows for a long period of time
184 indicates loss and triggers a negative acknowledgment.
186 The 'Retransmit' element is responsible for message retention, aging and
187 retransmission in response to NAKs. Each message received from the 'Socket'
188 element is held for predetermined amount of time in case retransmission is
189 required. Upon reception of a NAK duplicate is send if the requested message
190 is still available. Otherwise 'NoData' profile is sent.
193 The 'Link' element is responsible for interfacing with the IPv4 multicast
194 socket. It also parses over-the-wire representation into in-memory messages
195 with individually-accessible profiles.
198 Boris Kolpackov <boris@kolpackov.net>